Experiment
abses.core.experiment.Experiment ¶
Experiment class.
Source code in abses/core/experiment.py
name
property
¶
Experiment name from configuration.
Returns:
| Type | Description |
|---|---|
str
|
Experiment name from exp.name config, or 'experiment' if not set. |
logger
property
¶
Experiment-level logger for recording experiment logs.
Use this logger to write messages to the experiment log file (e.g., fire_spread.log) rather than model run logs.
Example
exp.logger.info("Experiment started") exp.logger.debug("Processing parameters...")
Returns:
| Type | Description |
|---|---|
Logger
|
The experiment-level logger instance. |
job_id
property
¶
Job id. Each job means a combination of the configuration. If the experiment is running in Hydra, it will return the hydra's job id.
new
classmethod
¶
Create a new experiment for the singleton class Experiment.
This method will delete all currently available exp results and settings.
Then, it initialize a new instance of experiment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_cls
|
Type[MainModelProtocol]
|
Using which model class to initialize the experiment. |
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the model class |
Returns:
| Type | Description |
|---|---|
'Experiment'
|
An experiment. |
Source code in abses/core/experiment.py
is_hydra_job
staticmethod
¶
summary ¶
batch_run ¶
Run the experiment multiple times.
Source code in abses/core/experiment.py
add_hooks ¶
Add hooks to the experiment.