Open codecypher opened 2 years ago
What version of keras-tuner are you using? Because this sounds familiar to an issue fixed in #662 that should have been resolved with version 1.1.1
Keras Tuner v 1.1.0
I updated to v 1.1.1 and it seems to be running. Will let you know if it completes.
Thanks, really didn't want to switch back to using Optuna (seems much slower).
Any idea when the version of Keras Tuner will be updated on Conda? Currently, v 1.1.0 (the version with this bug) is the latest version available.
I have been using the setting pip_interop_enabled: true
in .condarc and I switched to mambaforge since it performs much better than anaconda. Then you should be install keras-tuner using pip and things should stay in sync with conda. It has been working for me anyway.
Describe the bug
My code works fine with RandomSearch but generates an error using kt.BayesianOptimization, so not sure about the source of the error. The code was working fine in previous version of KerasTuner but the API changed so much in recent versions that I had to rewrite the code.
Best val_loss So Far: 3021.8214111328125 Total elapsed time: 00h 20m 26s Traceback (most recent call last): File "./stock_keras_tuner.py", line 570, in
main(params, ticker_list)
File "./stock_keras_tuner.py", line 480, in main
results_df = tune(params)
File "./stock_keras_tuner.py", line 388, in tune
tuner.search(
File "/Users/name/stock/lib/python3.8/site-packages/keras_tuner/engine/base_tuner.py", line 169, in search
trial = self.oracle.create_trial(self.tuner_id)
File "/Users/name/stock/lib/python3.8/site-packages/keras_tuner/engine/oracle.py", line 189, in create_trial
response = self.populate_space(trial_id)
File "/Users/name/stock/lib/python3.8/site-packages/keras_tuner/tuners/bayesian.py", line 232, in populate_space
if result.fun[0] < optimal_val:
TypeError: 'float' object is not subscriptable
Expected behavior
No errors.
Would you like to help us fix it? Yes.