pseudodynamics._config.ExperimentConfig

class pseudodynamics._config.ExperimentConfig(config=None, args=None, model=None)[source]

Bases: object

Records and manages experiment configuration settings.

Parameters:
find_lastest_ckpt()[source]

Find the ckpt file with the minimum val_loss.

Fallback: when val_loss was never logged (e.g. cord-blood PCA whose val_dataloader is empty), the ModelCheckpoint monitor fires no match and only last.ckpt exists (saved via save_last=True). In that case we return last.ckpt so eval does not fail with FileNotFoundError.

from_json(file_path, main_dir='/home/docs/checkouts/readthedocs.org/user_builds/pseudodynamics-plus/envs/latest/lib/python3.13/')[source]

Load a saved experiment configuration from JSON file.

Return type:

ExperimentConfig

Parameters:
  • file_path (str)

  • main_dir (str)

Args:

file_path: Path to the saved JSON configuration file

Returns:

ExperimentConfig instance with loaded parameters

save(path)[source]

Saves configuration to JSON file.

Parameters:

path (str)

to_dict()[source]

Returns all configurations as a dictionary.

Return type:

Dict[str, Any]

Methods table

find_lastest_ckpt()

Find the ckpt file with the minimum val_loss.

from_json(file_path[, main_dir])

Load a saved experiment configuration from JSON file.

get_args()

save(path)

Saves configuration to JSON file.

store_attr(json_load)

to_dict()

Returns all configurations as a dictionary.

Methods

ExperimentConfig.find_lastest_ckpt()[source]

Find the ckpt file with the minimum val_loss.

Fallback: when val_loss was never logged (e.g. cord-blood PCA whose val_dataloader is empty), the ModelCheckpoint monitor fires no match and only last.ckpt exists (saved via save_last=True). In that case we return last.ckpt so eval does not fail with FileNotFoundError.

ExperimentConfig.from_json(file_path, main_dir='/home/docs/checkouts/readthedocs.org/user_builds/pseudodynamics-plus/envs/latest/lib/python3.13/')[source]

Load a saved experiment configuration from JSON file.

Return type:

ExperimentConfig

Parameters:
  • file_path (str)

  • main_dir (str)

Args:

file_path: Path to the saved JSON configuration file

Returns:

ExperimentConfig instance with loaded parameters

ExperimentConfig.get_args()[source]
ExperimentConfig.save(path)[source]

Saves configuration to JSON file.

Parameters:

path (str)

ExperimentConfig.store_attr(json_load)[source]
ExperimentConfig.to_dict()[source]

Returns all configurations as a dictionary.

Return type:

Dict[str, Any]