You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Mark a trainobj as initialized by setting the ds_is_inited attribute to True."""
71
-
# we shouldn't hit the assert below, but just in case
72
-
assertnothasattr(
73
-
trainobj, 'ds_is_inited'
74
-
), "Model has already been initialized, please make sure to only call deepspeed.initialize on a model once."
71
+
ifhasattr(trainobj, 'ds_is_inited'):
72
+
asserttrainobj.ds_is_inited, "Not expecting the training object has `ds_is_inited` to be False if it exists, make sure you didn't set it to False or called deepspeed.initialize on the model more than once."
"""Check if a trainobj has been initialized by checking the ds_is_inited attribute."""
80
80
ifhasattr(trainobj, 'ds_is_inited'):
81
81
# we shouldn't hit the assert below, but just in case
82
-
asserttrainobj.ds_is_inited, "Not expecting the model has `ds_is_inited` to be False if it exists, make sure you didn't set it to False or called deepspeed.initialize on the model more than once."
82
+
asserttrainobj.ds_is_inited, "Not expecting the training object has `ds_is_inited` to be False if it exists, make sure you didn't set it to False or called deepspeed.initialize on the model more than once."
0 commit comments