Unverified Commit 2dd6fb25 authored by Josh Tanner's avatar Josh Tanner Committed by GitHub
Browse files

Update deepspeed config to reflect hyperparameter search parameters (#11896)

* rebuild deepspeed config for hyperparameter search

* reformat code to fix style issues
parent 42fe0dc2
......@@ -861,6 +861,11 @@ class Trainer:
setattr(self.args, key, value)
if self.hp_search_backend == HPSearchBackend.OPTUNA:
logger.info("Trial:", trial.params)
if self.args.deepspeed:
# Rebuild the deepspeed config to reflect the updated training parameters
from transformers.integrations import DeepSpeedConfigHF
self.args.deepspeed_config_hf = DeepSpeedConfigHF(self.args)
def _report_to_hp_search(
self, trial: Union["optuna.Trial", Dict[str, Any]], epoch: int, metrics: Dict[str, float]
......
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