nemo_export.utils._mock_import
#
Module Contents#
Functions#
Context manager to mock the import of a specified module if it is not available. |
Data#
Utility to mock imports of unavailable modules. |
API#
- nemo_export.utils._mock_import.LOGGER = 'getLogger(...)'#
Utility to mock imports of unavailable modules.
Created for the purpose of using NeMo checkpoints produced with nvcr.io/nvidia/nemo:25.02.rc2 containers (or later) and used in the environments where Megatron-Core is not available. This currently includes NIM containers.
- nemo_export.utils._mock_import._mock_import(module: str)#
Context manager to mock the import of a specified module if it is not available.
- Parameters:
module (str) – The name of the module to mock.
- Yields:
Yields control back to the caller.