Skip to content

Commit

Permalink
Provide an explanation for import error
Browse files Browse the repository at this point in the history
Signed-off-by: Mikołaj Błaż <mblaz@nvidia.com>
  • Loading branch information
mikolajblaz committed Jun 19, 2024
1 parent 9549a96 commit dbe8423
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions nemo/utils/callbacks/dist_ckpt_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@

HAVE_MEGATRON_CORE = True

except (ImportError, ModuleNotFoundError):
except (ImportError, ModuleNotFoundError) as e:

HAVE_MEGATRON_CORE = False
IMPORT_ERROR = "megatron-core was not found. Please see the NeMo README for installation instructions: https://github.com/NVIDIA/NeMo#megatron-gpt."
IMPORT_ERROR = (
"megatron-core was not found. Please see the NeMo README for installation instructions: https://github.com/NVIDIA/NeMo#megatron-gpt."
f" Exact error: {e}"
)


@contextmanager
Expand Down

0 comments on commit dbe8423

Please sign in to comment.