tracdap.rt.launch

Package Contents

Functions

launch_cli()

Launch the TRAC runtime using the command line interface

launch_job(job_config, sys_config[, dev_mode])

Launch a TRAC job using external configuration files

launch_model(model_class, job_config, sys_config, ...)

Launch an individual model using its Python class

tracdap.rt.launch.launch_cli()

Launch the TRAC runtime using the command line interface

tracdap.rt.launch.launch_job(job_config, sys_config, dev_mode=False, **launch_args)

Launch a TRAC job using external configuration files

Parameters:
  • job_config (Union[str, pathlib.Path]) – Path to the job configuration file

  • sys_config (Union[str, pathlib.Path]) – Path to the system configuration file

  • dev_mode (bool) – Whether to launch in dev mode (applies dev mode translation to the job inputs)

  • launch_args – Additional keyword args to control behavior of the TRAC runtime (not normally required)

tracdap.rt.launch.launch_model(model_class, job_config, sys_config, **launch_args)

Launch an individual model using its Python class

This launch method launches the supplied model class directly, it must be called from the Python codebase containing the model class. The TRAC runtime will launch within the current Python process, job target and model repositories are configured automatically and dev mode will be enabled. This method is mainly useful for launching development and debugging runs.

To resolve the paths of the job and system config files, paths are tried in the following order:

  1. If an absolute path is supplied, this takes priority

  2. Resolve relative to the current working directory

  3. Resolve relative to the directory containing the Python module of the model

Parameters:
  • model_class (tracdap.rt.api.TracModel.__class__) – The model class that will be launched

  • job_config (Union[str, pathlib.Path]) – Path to the job configuration file

  • sys_config (Union[str, pathlib.Path]) – Path to the system configuration file

  • launch_args – Additional keyword args to control behavior of the TRAC runtime (not normally required)