Entry Points¶
multimolecule.api.run.train
¶
Train a model with config.training = True.
Wraps the run in a dl.debug context when config.debug is truthy, then invokes
runner.train(). Console-script entry point for mmtrain.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Config | None
|
Optional pre-built configuration; CLI overrides are still applied via
|
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Whatever the underlying |
Source code in multimolecule/api/run.py
multimolecule.api.run.evaluate
¶
Evaluate a model on the configured splits with config.training = False.
Console-script entry point for mmevaluate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Config | None
|
Optional pre-built configuration; CLI overrides are still applied. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Whatever the underlying |
Source code in multimolecule/api/run.py
multimolecule.api.run.infer
¶
Run inference and save predictions to config.result_path (defaults to ./result.json with a warning).
Console-script entry point for mminfer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Config | None
|
Optional pre-built configuration; CLI overrides are still applied. |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Whatever the underlying |
Source code in multimolecule/api/run.py
multimolecule.api.run.prepare_config
¶
Parse, finalize, and apply runtime side-effects to a runner Config.
Reads config.yaml from the current working directory (warning if missing) and applies CLI overrides via
Config.parse, then forces config.training if requested, runs the
dynamic_import hook, applies CUDA precision flags
(allow_tf32, reduced_precision_reduction), and merges NNI hyperparameters when config.nni is truthy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Config | None
|
Optional pre-built configuration. When |
None
|
|
bool | None
|
When set, overrides |
None
|
Returns:
| Type | Description |
|---|---|
Config
|
The parsed and finalized configuration. |
Source code in multimolecule/api/run.py
multimolecule.api.run.dynamic_import
¶
dynamic_import(pretrained: str | None = None) -> None
Import the working-directory package (and an optional pretrained sub-directory) so user-defined datasets,
models, and runners register themselves before the runner is built.
Appends the parent of cwd to sys.path and imports os.path.basename(cwd) as a Python module. If
pretrained matches a sub-directory of cwd, that sub-directory is also appended and imported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | None
|
Optional secondary module to import — typically the experiment’s |
None
|