Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 0 additions & 5 deletions examples/inference/gpt/gpt_dynamic_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@
import io
import megatron

torch.serialization.add_safe_globals([io.BytesIO])
torch.serialization.add_safe_globals([megatron.core.rerun_state_machine.RerunState])
torch.serialization.add_safe_globals([megatron.core.rerun_state_machine.RerunDiagnostic])
Comment thread
ericharper marked this conversation as resolved.
Resolved



def add_dynamic_inference_args(parser: ArgumentParser) -> ArgumentParser:
"""Dynamic inference arguments."""
Expand Down
2 changes: 2 additions & 0 deletions megatron/core/safe_globals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.

from argparse import Namespace
from io import BytesIO
from pathlib import PosixPath
from types import SimpleNamespace

Expand All @@ -26,6 +27,7 @@
RerunDiagnostic,
RerunMode,
RerunState,
BytesIO,
]


Expand Down
Loading