"...git@developer.sourcefind.cn:OpenDAS/diffusers.git" did not exist on "9eb389f298714b1d63458a9553778e135cca562a"
Unverified Commit 69873d52 authored by Sourab Mangrulkar's avatar Sourab Mangrulkar Committed by GitHub
Browse files

fix the model card issue as `use_cuda_amp` is no more available (#26731)

parent cc44ca80
...@@ -895,10 +895,10 @@ def extract_hyperparameters_from_trainer(trainer): ...@@ -895,10 +895,10 @@ def extract_hyperparameters_from_trainer(trainer):
hyperparameters["num_epochs"] = trainer.args.num_train_epochs hyperparameters["num_epochs"] = trainer.args.num_train_epochs
if trainer.args.fp16: if trainer.args.fp16:
if trainer.use_cuda_amp: if trainer.use_apex:
hyperparameters["mixed_precision_training"] = "Native AMP"
elif trainer.use_apex:
hyperparameters["mixed_precision_training"] = f"Apex, opt level {trainer.args.fp16_opt_level}" hyperparameters["mixed_precision_training"] = f"Apex, opt level {trainer.args.fp16_opt_level}"
else:
hyperparameters["mixed_precision_training"] = "Native AMP"
if trainer.args.label_smoothing_factor != 0.0: if trainer.args.label_smoothing_factor != 0.0:
hyperparameters["label_smoothing_factor"] = trainer.args.label_smoothing_factor hyperparameters["label_smoothing_factor"] = trainer.args.label_smoothing_factor
......
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