Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modelopt/torch/opt/plugins/mcore_dist_checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ def _parse_transformer_config(transformer_config: dict) -> dict:
if isinstance(v, (bool, int, str)):
config[k] = v
else:
config[k] = str(v)
# Handle https://github.com/NVIDIA/Model-Optimizer/issues/981 where
# hierarchical_context_parallel_sizes: [8, 2] will raise a TypeError.
try:
config[k] = str(v)
except (AttributeError, TypeError):
print("Warning: TransformerConfig.{} does not have _repr_ implemented.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to add something to the empty {}?


return config

Expand Down
Loading