From bae96bacd7c60f688e4c5c697e3549128520de97 Mon Sep 17 00:00:00 2001 From: AdrianSosic Date: Wed, 5 Feb 2025 22:03:14 +0100 Subject: [PATCH] Refine some docstrings --- benchmarks/definition/base.py | 8 ++++---- benchmarks/definition/convergence.py | 4 ++-- benchmarks/result/result.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/definition/base.py b/benchmarks/definition/base.py index 2e3046eee0..5e9672dd40 100644 --- a/benchmarks/definition/base.py +++ b/benchmarks/definition/base.py @@ -18,10 +18,10 @@ @define(frozen=True, kw_only=True) class BenchmarkSettings(ABC, BenchmarkSerialization): - """Benchmark configuration for recommender analyses.""" + """The basic benchmark configuration.""" random_seed: int = field(validator=instance_of(int), default=1337) - """The random seed for reproducibility.""" + """The used random seed.""" BenchmarkSettingsType = TypeVar("BenchmarkSettingsType", bound=BenchmarkSettings) @@ -29,10 +29,10 @@ class BenchmarkSettings(ABC, BenchmarkSerialization): @define(frozen=True) class Benchmark(Generic[BenchmarkSettingsType], BenchmarkSerialization): - """The base class for a benchmark executable.""" + """The base class for all benchmark definitions.""" function: Callable[[BenchmarkSettingsType], DataFrame] = field() - """The callable which contains the benchmarking logic.""" + """The callable containing the benchmarking logic.""" settings: BenchmarkSettingsType = field() """The benchmark configuration.""" diff --git a/benchmarks/definition/convergence.py b/benchmarks/definition/convergence.py index 488c1f233a..0881e817e2 100644 --- a/benchmarks/definition/convergence.py +++ b/benchmarks/definition/convergence.py @@ -27,7 +27,7 @@ class ConvergenceBenchmark(Benchmark[ConvergenceBenchmarkSettings]): """A class for defining convergence benchmarks.""" best_possible_result: float | None = field(default=None) - """The best possible result which can be achieved in the optimization process.""" + """The best possible result that can be achieved in the optimization process.""" optimal_function_inputs: list[dict[str, Any]] | None = field(default=None) - """An input that creates the best_possible_result.""" + """The optimal inputs to the system being optimized.""" diff --git a/benchmarks/result/result.py b/benchmarks/result/result.py index 842052c290..e2ad12c4d0 100644 --- a/benchmarks/result/result.py +++ b/benchmarks/result/result.py @@ -12,7 +12,7 @@ @define(frozen=True) class Result(BenchmarkSerialization): - """A single result of the benchmarking.""" + """A single benchmarking result.""" benchmark_identifier: str = field(validator=instance_of(str)) """The identifier of the benchmark that produced the result."""