keras-team / autokeras

AutoML library for deep learning
http://autokeras.com/
Apache License 2.0
9.16k stars 1.4k forks source link

error : KeyError: 'text_block_1/conv_block_1/filters_0_1' with textclassifier #1812

Closed YASIRAQ closed 1 year ago

YASIRAQ commented 1 year ago

I'm doing a text classification with 5 trials, in the 3rd I'm getting this error

this is a part of my code: clf = ak.TextClassifier(max_trials = 50, overwrite =True) clf.fit(x_train, y_train, epochs=100 , verbose = 2 , validation_data=(x_valid,y_valid))

this error I have faced was : KeyError: 'text_block_1/conv_block_1/filters_0_1'

haifeng-jin commented 1 year ago

@YASIRAQ Would you please confirm the autokeras and keras-tuner version you are using? You can run pip freeze to show them.

It would be even better if you can provide a short colab notebook to reproduce the error. You can use fake data and fix the seed. Thanks.

YASIRAQ commented 1 year ago

@YASIRAQ Would you please confirm the autokeras and keras-tuner version you are using? You can run pip freeze to show them.

It would be even better if you can provide a short colab notebook to reproduce the error. You can use fake data and fix the seed. Thanks.

the versions I use are : auto keras =1.0.20 keras-tuner =1.1.3

if you do not mind explaining what i must do exactly ? thank you very much

haifeng-jin commented 1 year ago

@YASIRAQ It seems like a bug, but I cannot reproduce it. The 3rd trial is always the Bert model. There is no randomness in the first 3 trials. Do you see this error if you run this tutorial for 5 trials?

YASIRAQ commented 1 year ago

I run the tutorial , it worked well the most important I want to tell you that I worked on my dataset on Sunday , it worked well . the problem happened yesterday may be this bug happens randomly ?

RaedMatti commented 1 year ago

When I run 2 trials the code works well, as you said the problem happens with the BERT model in the 3rd trial. One time it worked with 10 trials and I had good results. The error occurs randomly.

@YASIRAQ It seems like a bug, but I cannot reproduce it. The 3rd trial is always the Bert model. There is no randomness in the first 3 trials. Do you see this error if you run this tutorial for 5 trials?

haifeng-jin commented 1 year ago

It is really strange. I don't think there is any randomness in the first 3 trials. The tuner would try 3 sets of predefined hyperparameters before exploring the rest.

Is it possible that it is because that you removed overwrite=True, which caused the problem?

It seems an important bug, but I cannot reproduce it on my computer.

RaedMatti commented 1 year ago

I didn't remove overwrite=True, now I'm running an autosklearn code on the same dataset, and it's working, and I don't have any issues with it. When I run AK On Colab sometimes it passes the 3rd trial and sometimes don't but on kaggle it didn't pass the 3rd trial.

YASIRAQ commented 1 year ago

I didn't remove overwrite=True, now I'm running an autosklearn code on the same dataset, and it's working, and I don't have any issues with it. When I run AK On Colab sometimes it passes the 3rd trial and sometimes don't but on Kaggle it didn't pass the 3rd trial.

hi , I'm beginner in deep learning area , and I only use Collab . is there any other servers I can use to run my codes ? thank you very much

RaedMatti commented 1 year ago

I didn't remove overwrite=True, now I'm running an autosklearn code on the same dataset, and it's working, and I don't have any issues with it. When I run AK On Colab sometimes it passes the 3rd trial and sometimes don't but on Kaggle it didn't pass the 3rd trial.

hi , I'm beginner in deep learning area , and I only use Collab . is there any other servers I can use to run my codes ? thank you very much

You can use >> https://www.kaggle.com/ it will give you grate resources for learning, and you can run your codes either.