"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e1c3ac25515839146c93427e55941de9cee3401e"
Unverified Commit 26e5e129 authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[deepspeed] fix load_best_model test (#17550)

parent 72f5b949
...@@ -752,6 +752,8 @@ class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomConfig, T ...@@ -752,6 +752,8 @@ class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomConfig, T
# must use this setting to get the reload path exercised # must use this setting to get the reload path exercised
ds_config_dict["zero_optimization"]["stage3_gather_16bit_weights_on_model_save"] = True ds_config_dict["zero_optimization"]["stage3_gather_16bit_weights_on_model_save"] = True
with mockenv_context(**self.dist_env_1_gpu):
tokenizer = T5Tokenizer.from_pretrained(T5_TINY) tokenizer = T5Tokenizer.from_pretrained(T5_TINY)
model = T5ForConditionalGeneration.from_pretrained(T5_TINY) model = T5ForConditionalGeneration.from_pretrained(T5_TINY)
...@@ -804,8 +806,6 @@ class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomConfig, T ...@@ -804,8 +806,6 @@ class TrainerIntegrationDeepSpeed(TrainerIntegrationDeepSpeedWithCustomConfig, T
"deepspeed": ds_config_dict, "deepspeed": ds_config_dict,
} }
with mockenv_context(**self.dist_env_1_gpu):
training_args = TrainingArguments(output_dir, **args_dict) training_args = TrainingArguments(output_dir, **args_dict)
trainer = Trainer( trainer = Trainer(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment