tsadar.runner#

Functions

load_and_make_folders(cfg_path)

This is used to queue runs on NERSC

run(cfg_path, mode)

Wrapper for lower level runner

run_for_app(run_id)

Dedicated run wrapper for the web app.

run_job(run_id, mode, nested)

This is used to run queued runs on NERSC.

tsadar.runner.load_and_make_folders(cfg_path: str) Tuple[str, Dict]Source#

This is used to queue runs on NERSC

Parameters:

cfg_path – path to the config folder

Returns:

run_id – mlflow run id all_configs: dictionary of all configs

tsadar.runner.run(cfg_path: str, mode: str) strSource#

Wrapper for lower level runner

Parameters:
  • cfg_path – path to the config folder

  • mode – either “fit” or “forward”

Returns:

run_id – mlflow run id

tsadar.runner.run_for_app(run_id: str) strSource#

Dedicated run wrapper for the web app. Downloads the config and data files from the MLflow run’s artifact URI, updates the configuration with local file paths, and executes the main run method in “fit” mode.

Parameters:

run_id (str) – The MLflow run ID to resume or use for logging.

Returns:

str – The MLflow run ID used for this execution.

Side Effects:
  • Downloads files to a temporary directory.

  • May modify the configuration dictionary in memory.

  • Executes the main application logic via _run_.

tsadar.runner.run_job(run_id: str, mode: str, nested: bool)Source#

This is used to run queued runs on NERSC. It picks up the run_id and finds that using MLFlow and does the fitting

Parameters:
  • run_id – mlflow run id

  • mode – either “fit” or “forward”

  • nested – whether to start a nested run or not

  • True (- If)

  • context. (starts a nested run within the current MLflow run)

  • False (- If)

  • run. (starts a new)

Returns:

None

Note

  • The function downloads the configuration files from the MLflow run’s artifact URI to a temporary directory.

  • It flattens and unflattens the configuration dictionary for easier manipulation.

  • The _run_ function is called to execute the main application logic with the provided mode.