AbruptWorm50 my apologies I think I mislead you you, yes you can pass geenric arguments to the optimizer class, but specifically for optuna, this is disabled (not sure why)
Specifically to your case, the way it works is:
your code logs to tensorboard, clearml catches the data and moves it to the Task (on clearml-server), optuna optimization is running on another machine, trail valies are maanually updated (i.e. the clearml optimization pulls the Task reported metric from the server and updates optuna, optuna early stopping is called (i.e. trial.should_prune()), if the trial need to be stopped, the clearml-optimization aborts the Task (the one running on a different machine)
Does that make sense ?
Specifically, what would be the part you would want modify?
(Notice again the Optuna process is not actually running on the same machine, even though in reality it can be the same one, this is not the same process, this is how it scales ti multi machines so quickly with clearml-agent)