nemo_automodel.components.launcher.nemo_run.utils
nemo_automodel.components.launcher.nemo_run.utils
Module Contents
Functions
Data
API
Apply YAML overrides to an executor via setattr.
Dict and list values are merged with existing executor attributes (dicts are updated, lists are extended). All other values are set directly.
Parameters:
Executor instance to configure, from EXECUTOR_MAP.
Attribute name to value, collected by
NemoRunConfig.from_dict from the unrecognised keys of the
nemo_run: YAML section.
Raises:
ValueError: Ifexecutorhas no attribute named by one of the keys. NeMo-Run executors are dataclasses with fixed fields, so assigning an unknown name would create an attribute the scheduler never reads, leaving the field the user meant to set at its default.
Load a named executor from a Python file containing an EXECUTOR_MAP.
The file (typically $NEMORUN_HOME/executors.py) must define a module-level
EXECUTOR_MAP dictionary whose keys are executor names and whose values
are pre-built nemo_run executor instances (or zero-arg callables that
return one).
Parameters:
Key to look up in EXECUTOR_MAP.
Absolute path to the Python file.
Returns: Any
The executor object.
Raises:
FileNotFoundError: If executors_file does not exist.KeyError: If name is not found in theEXECUTOR_MAP.
Submit a job via NeMo-Run’s Experiment API.
Parameters:
A nemo_run.Script object.
A NeMo-Run executor instance.
Experiment and task name.
If True, return immediately after submission.
If True, stream logs after submission.
Returns: int
0 on successful submission.