auto_ml
auto_ml copied to clipboard
Loading deep learning model has an error
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
I am also having this issue, making it very hard to run different datasets
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)