mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Modify the Trainer class to handle simultaneous execution of Ray Tune and Weights & Biases (#10823)
* Modify the _hp_search_setup method on the Trainer class to handle the wandb argument passed by Ray Tune to model config. * Reformat single quotes as double quotes.
This commit is contained in:
parent
125ccead71
commit
a8d4d6776d
@ -700,8 +700,12 @@ class Trainer:
|
||||
|
||||
if self.hp_search_backend is None or trial is None:
|
||||
return
|
||||
if self.hp_search_backend == HPSearchBackend.OPTUNA:
|
||||
params = self.hp_space(trial)
|
||||
elif self.hp_search_backend == HPSearchBackend.RAY:
|
||||
params = trial
|
||||
params.pop("wandb", None)
|
||||
|
||||
params = self.hp_space(trial) if self.hp_search_backend == HPSearchBackend.OPTUNA else trial
|
||||
for key, value in params.items():
|
||||
if not hasattr(self.args, key):
|
||||
raise AttributeError(
|
||||
|
Loading…
Reference in New Issue
Block a user