Skip to content

Registries

Every component (dataset, task, pool generator, long-series generator, assembler, joiner, model, fidelity metric group, utility metric, statistical test) is registered by name in a registry of bench.registry. How to add one: Extending.

marathonts.bench.registry

Registries: every pluggable part of the benchmark is looked up by name.

from marathonts.bench import registry as R
from marathonts.bench.models import BaseModel

@R.models.register("my_model")
class MyModel(BaseModel): ...

Registries: datasets, tasks, pool_generators, long_generators, assemblers, joiners, methods, models, fidelity_metrics, utility_metrics. The hypothesis part has its own for statistical tests and hypotheses (hypotheses.stats.DATASET_TESTS and GLOBAL_TESTS, hypotheses.catalog.HYPOTHESES).

Registry

register

register(name: str, obj: Any = None, *, overwrite: bool = False)

registry.register("x", obj) or as a decorator @registry.register("x").

load_builtins

load_builtins() -> None

Import the modules whose import registers the built-in components.