Skip to content
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

Loading deep learning model has an error #412

Open
aojue1109 opened this issue Aug 24, 2018 · 2 comments
Open

Loading deep learning model has an error #412

aojue1109 opened this issue Aug 24, 2018 · 2 comments

Comments

@aojue1109
Copy link

Executing code loading deep learning model has the following error

from auto_ml.utils_models import load_ml_model trained_ml_pipeline = load_ml_model("auto_ml_saved_pipeline.dill")
trained_ml_pipeline.predict(data)

An error occurred:

Traceback (most recent call last):
File "/root/situ/automl/ctest.py", line 48, in
trained_ml_pipeline = load_ml_model("auto_ml_saved_pipeline.dill")
File "/root/anaconda3/envs/automl/lib/python3.6/site-packages/auto_ml/utils_models.py", line 629, in load_ml_model
pipeline_step.model = insert_deep_learning_model(pipeline_step, file_name)
File "/root/anaconda3/envs/automl/lib/python3.6/site-packages/auto_ml/utils_models.py", line 594, in insert_deep_learning_model
model = keras_load_model(keras_file_name)
TypeError: 'NoneType' object is not callable

@jameshgrn
Copy link

I am also having this issue, making it very hard to run different datasets

@sbertech
Copy link

sbertech commented Sep 24, 2018

The problem is that the initialization of keras is done in utils_models.get_model_from_name(). Which, in turn, is called only from a couple places in Predictor.
The workaround for this bug is to call the method directly before loading the model:

from auto_ml import utils_models
     ...
utils_models.get_model_from_name ('DeepLearningRegressor')
model = utils_models.load_ml_model (file_name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants