nemo_automodel.components.models

View as Markdown

Convenience model builders for NeMo Automodel.

Subpackages

Submodules

Package Contents

Classes

NameDescription
_MissingModelFinderProduces a helpful error when importing a non-existent model subpackage.

Functions

NameDescription
__getattr__-
_available_model_submodulesReturn the set of model sub-package names shipped with this installation.
_make_upgrade_message-

Data

_MODELS_DIR

_PACKAGE_PREFIX

__all__

API

class nemo_automodel.components.models._MissingModelFinder()

Bases: MetaPathFinder

Produces a helpful error when importing a non-existent model subpackage.

Installed at the end of sys.meta_path so it is only consulted after all real finders have already returned None. For any import of the form nemo_automodel.components.models.<name> (direct child only), it raises a ModuleNotFoundError with upgrade instructions instead of the default unhelpful message.

nemo_automodel.components.models._MissingModelFinder.find_spec(
fullname,
path,
target = None
)
nemo_automodel.components.models.__getattr__(
name: str
)
nemo_automodel.components.models._available_model_submodules() -> set[str]

Return the set of model sub-package names shipped with this installation.

nemo_automodel.components.models._make_upgrade_message(
name: str
) -> str
nemo_automodel.components.models._MODELS_DIR = pathlib.Path(__file__).parent
nemo_automodel.components.models._PACKAGE_PREFIX = __name__ + '.'
nemo_automodel.components.models.__all__ = ['build_gpt2_model']