-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: KeyError: 'text_block_1/max_tokens' #1882
Comments
I'm getting this issue too, were you able to fix it? |
Me, too 😕 |
I have encountered a similar error. Search: Running Trial #5 Value |Best Value So Far |Hyperparameter Traceback (most recent call last): |
I am facing this issue too on auto-keras == 1.1.0. |
Contribution is welcome on this issue! |
Bug Description
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/base_tuner.py", line 270, in _try_run_and_update_trial
self._run_and_update_trial(trial, *fit_args, **fit_kwargs)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/base_tuner.py", line 235, in _run_and_update_trial
results = self.run_trial(trial, *fit_args, **fit_kwargs)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/tuner.py", line 287, in run_trial
obj_value = self._build_and_fit_model(trial, *args, **copied_kwargs)
File "/usr/local/lib/python3.10/dist-packages/autokeras/engine/tuner.py", line 91, in _build_and_fit_model
model = self._try_build(trial.hyperparameters)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/tuner.py", line 155, in _try_build
model = self._build_hypermodel(hp)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/tuner.py", line 146, in _build_hypermodel
model = self.hypermodel.build(hp)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/hypermodel.py", line 115, in _build_wrapper
return self._build(hp, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/autokeras/graph.py", line 250, in build
outputs = block.build(hp, inputs=temp_inputs)
File "/usr/local/lib/python3.10/dist-packages/autokeras/engine/block.py", line 38, in _build_wrapper
return super()._build_wrapper(hp, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/hypermodel.py", line 115, in _build_wrapper
return self._build(hp, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/autokeras/blocks/wrapper.py", line 159, in build
output_node = self._build_block(hp, output_node, block_type)
File "/usr/local/lib/python3.10/dist-packages/autokeras/blocks/wrapper.py", line 165, in _build_block
max_tokens = self.max_tokens or hp.Choice(
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/hyperparameters/hyperparameters.py", line 295, in Choice
return self._retrieve(hp)
File "/usr/local/lib/python3.10/dist-packages/keras_tuner/engine/hyperparameters/hyperparameters.py", line 203, in _retrieve
return self.values[hp.name]
KeyError: 'text_block_1/max_tokens'
Bug Reproduction
When fit the model on random trial i have error. It can be trial=7 or trial =63
model2 = ak.AutoModel(
inputs=[ak.TextInput(), ak.StructuredDataInput()],
outputs=[
ak.RegressionHead(metrics=["mae"])
],
overwrite=False,
max_trials=100,
objective ='val_mae'
)
model2.fit(
[texts_all_np_train, xTrain_train],
y_train,
epochs=8,
validation_split=0.2
)
Data used by the code:
texts_all_np_train= df['Stage_Description'].values #str
Expected Behavior
Setup Details
Include the details about the versions of:
Additional context
The text was updated successfully, but these errors were encountered: