cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
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
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
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
Esteemed Contributor III

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

image

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.