DeepSDFStruct.design_of_experiments#

Functions

create_experiment(exp_dir, specs)

Create a new experiment directory and specs.json file, copying defaults and applying overrides.

run_experiment(exp_name, data_dir[, ...])

Creates an experiment with overrides, trains the model, and logs everything to MLflow.

Classes

ExperimentSpecifications([specs])

A dictionary-like class to hold and update experiment specifications.

class DeepSDFStruct.design_of_experiments.ExperimentSpecifications(specs=None)#

Bases: dict

A dictionary-like class to hold and update experiment specifications. Supports recursive updates for nested dictionaries. Can be initialized from a dictionary or loaded from a file (JSON/YAML).

Parameters:

specs (Dict[str, Any] | str | None)

copy()#

Return a deep copy of the specifications.

flatten(parent_key='', sep='.')#

Flatten nested dictionary (including lists of dicts) into a single-level dict with dot-separated keys.

Return type:

Dict[str, Any]

Parameters:
  • parent_key (str)

  • sep (str)

save(filename)#

Save current specifications to a JSON or YAML file.

Return type:

None

Parameters:

filename (str)

update(updates)#

Recursively update the experiment specifications with new values.

Return type:

None

Parameters:

updates (Dict[str, Any])

DeepSDFStruct.design_of_experiments.create_experiment(exp_dir, specs)#

Create a new experiment directory and specs.json file, copying defaults and applying overrides.

Parameters:
  • exp_dir (str) – Path to new experiment directory.

  • specs (dict) – Dictionary containing the experiment specifications.

DeepSDFStruct.design_of_experiments.run_experiment(exp_name, data_dir, batch_split=1, run_name=None, specs=None, device='cpu', tracking_uri='mlruns')#

Creates an experiment with overrides, trains the model, and logs everything to MLflow.

Parameters:
  • exp_name (str) – Name of the experiment folder.

  • data_dir (str) – Path to the dataset.

  • specs (dict) – Experiment specifications

  • device (str) – Training device (‘cpu’ or ‘cuda’).

  • mlflow_experiment_name (str) – Name of the MLflow experiment.

  • register_model (bool) – If True, register the final model in MLflow Model Registry.