Skip to content

Commit

Permalink
Refine some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSosic committed Feb 5, 2025
1 parent 9fc5cdd commit 04966be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions benchmarks/definition/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@

@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)


@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."""
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/definition/convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
2 changes: 1 addition & 1 deletion benchmarks/result/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ResultMetadata(BenchmarkSerialization):
"""The latest BayBE tag reachable in the ancestor commit history."""

branch: str = field(validator=instance_of(str), init=False)
"""The branch currently checked out."""
"""The branch checked out during benchmark execution."""

@branch.default
def _default_branch(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/result/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit 04966be

Please sign in to comment.