You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since these arguments are not recognized by SklearnTuner, they need to be removed or handled differently if you're using SklearnTuner. reg_tuner = kt.tuners.SklearnTuner( oracle=kt.oracles.BayesianOptimizationOracle( objective=kt.Objective('score', 'max'), max_trials=max_trials ), hypermodel=tunereg.myregclsmodels, scoring=scoring_, overwrite=True, directory=f'{pathHptLogs}', project_name=f'{something}' )
Consider Using a Different Tuner:
If you need executions_per_trial or distribution_strategy, you might need to switch to a BayesianOptimization or Hyperband tuner that works with TensorFlow/Keras models, not scikit-learn models.
Replicate executions_per_trial:
If you want to replicate executions_per_trial functionality, you can loop over your trials manually. For example: for _ in range(executions_per_trial): tuner.search(X_train, y_train)
Check Documentation or Source Code:
Ensure that you’re using the correct version of KerasTuner and that it aligns with your intended use case. It's possible that future versions might introduce support for such arguments, so check the KerasTuner GitHub repository for updates.
Raise an Issue or Contribute:
If you believe this functionality is critical, consider raising a feature request or contributing to the KerasTuner codebase to extend support for executions_per_trial or distribution_strategy in SklearnTuner.
Describe the bug
When you add executions_per_trial and distribution_stategy arguments
reg_tuner = kt.tuners.SklearnTuner(oracle=kt.oracles.BayesianOptimizationOracle(objective=kt.Objective('score','max'), max_trials = max_trials), hypermodel=tunereg.myregclsmodels, scoring=scoring_,executions_per_trial=exctns_per_trial, overwrite=True, distribution_strategy=tf.distribute.MirroredStrategy(), directory=f'{pathHptLogs}', project_name=f'{something}')
To Reproduce
(https://colab.research.google.com/drive/1-XAUlX4OneNfy6ErGqyMGwmVXe-UXVh9#scrollTo=YmjNIU7Hg66G)
Expected behavior
For it to work.
Additional context
ValueError: Unrecognized arguments ['distribution_strategy', 'executions_per_trial'] for
BaseTuner.__init__()
.Would you like to help us fix it?
The text was updated successfully, but these errors were encountered: