Unable to import sklearn.model_selection.StratifiedGroupKFold in Sagemaker Processing job

0

I'm running a Sagemaker Processing job with SKLearnProcessor processor. I tested code locally and it works fine.

from sklearn.model_selection import StratifiedGroupKFold

But when I run it on Sagemaker Processing, it gives me exception:

ImportError: cannot import name 'StratifiedGroupKFold' from 'sklearn.model_selection' (/miniconda3/lib/python3.7/site-packages/sklearn/model_selection/__init__.py)

I verified scikit-learn version on Sagemaker processiong job it shows 0.23.2. which are should have these packages but I am not sure why am I getting this error?

Any help would be appreaciated! Thanks!

AWS
Tejal_G
asked 6 months ago210 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions