We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8760390 commit 15355afCopy full SHA for 15355af
megatron/training.py
@@ -69,9 +69,12 @@ def print_datetime(string):
69
'''
70
def _create_ds_config_dict():
71
args = get_args()
72
- with open(args.deepspeed_config, 'r', encoding='utf-8') as config_file:
73
- ds_config_dict = json.load(config_file)
74
-
+ if isinstance(args.deepspeed_config, dict) :
+ ds_config_dict = args.deepspeed_config
+ else:
75
+ with open(args.deepspeed_config, 'r', encoding='utf-8') as config_file:
76
+ ds_config_dict = json.load(config_file)
77
+
78
if args.universal_checkpoint:
79
ds_config_dict["checkpoint"] = {"load_universal": True}
80
0 commit comments