"vscode:/vscode.git/clone" did not exist on "9da1acaea2079d9c08e2fec2d4677ac1d947273c"
Unverified Commit a8d4d677 authored by Ruan Chaves's avatar Ruan Chaves Committed by GitHub
Browse files

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.
parent 125ccead
......@@ -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(
......
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