nemo_automodel.cli.utils

View as Markdown

Module Contents

Functions

NameDescription
_discover_recipe_classesScan nemo_automodel/recipes/ for concrete recipe classes.
load_yamlLoad and return a YAML file as a dict.
resolve_recipe_nameResolve a recipe name to its fully-qualified dotted path.

Data

_RECIPES_DIR

logger

API

nemo_automodel.cli.utils._discover_recipe_classes() -> dict[str, str]

Scan nemo_automodel/recipes/ for concrete recipe classes.

Returns a mapping from bare class name to fully-qualified dotted path, e.g. {"TrainFinetuneRecipeForNextTokenPrediction": "nemo_automodel.recipes.llm.train_ft.TrainFinetuneRecipeForNextTokenPrediction"}.

nemo_automodel.cli.utils.load_yaml(
file_path
)

Load and return a YAML file as a dict.

nemo_automodel.cli.utils.resolve_recipe_name(
raw: str
) -> str

Resolve a recipe name to its fully-qualified dotted path.

Raises ValueError when a bare name cannot be found.

nemo_automodel.cli.utils._RECIPES_DIR = Path(__file__).resolve().parent.parent / 'recipes'
nemo_automodel.cli.utils.logger = logging.getLogger(__name__)