cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

ML Practioner | ML 11 - XGBoost notebook | cannot import keras.applications.resnet50

Slalom_Tobias
New Contributor III

the following code...

from sparkdl.xgboost import XgboostRegressor

from pyspark.ml import Pipeline

params = {"n_estimators": 100, "learning_rate": 0.1, "max_depth": 4, "random_state": 42, "missing": 0}

xgboost = XgboostRegressor(**params)

pipeline = Pipeline(stages=[string_indexer, vec_assembler, xgboost])

pipeline_model = pipeline.fit(train_df)

generates the following error...

ImportError: cannot import name 'resnet50' from 'keras.applications' (/local_disk0/.ephemeral_nfs/envs/pythonEnv-d671417d-c26e-4e1b-ab99-6ea93e646ec3/lib/python3.8/site-packages/keras/applications/__init__.py)

i've looked at the modules in keras.applications and as the screenshots show, there is no resnet50, so I think a dependency needs to be updated.

1 ACCEPTED SOLUTION

Accepted Solutions

Prabakar
Esteemed Contributor III

@Tobias Cortese​  I could see you are using the standard DBR version and it is expected. Please use the ML DBR version and it should resolve your issue.

View solution in original post

3 REPLIES 3

Prabakar
Esteemed Contributor III

@Tobias Cortese​  I could see you are using the standard DBR version and it is expected. Please use the ML DBR version and it should resolve your issue.

SaraGHn
New Contributor III

@Prabakar Ammeappin​  I have the same issue. I am getting error and I don’t understand what do you man by ML DBR version. Can you help me.

image.jpegimage 

Prabakar
Esteemed Contributor III

You need to choose the runtime for ML instead of the standard.

image

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group