Replace SKLearn with supported code

Brage Mogstad 6 Reputation points
2022-02-23T14:48:09.823+00:00

Hello,
Any ideas on how to rewrite this code to supported Python code?
This code in a demo does not run well:

WARNING:azureml.train.sklearn:'SKLearn' estimator is deprecated

from azureml.train.sklearn import SKLearn

estimator = SKLearn(source_directory='./Scripts',
compute_target=compute_target,
entry_script='train.py',
inputs=[tabular.as_named_input('training')],
pip_packages=['azureml-dataprep[fuse,pandas]','joblib==0.14.1','azureml-interpret','azureml-contrib-interpret','matplotlib','scikit-learn==0.22.1','seaborn'])

run = experiment.submit(estimator)
run

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,337 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 53,971 Reputation points Moderator
    2022-02-24T01:08:42.71+00:00

    Hello,

    Thanks for reaching out to us,"SKLearn" estimator classes has been deprecated in favor of using "ScriptRunConfig" to configure experiment runs.

    Here I would recommend you to follow the document to see how to run your scikit-learn training scripts with Azure Machine Learning.
    https://learn.microsoft.com/en-us/azure/machine-learning/how-to-train-scikit-learn?view=azure-ml-py

    This is a good guidance for customer to migrate from SKLearn Estimator to ScriptRunConfig.

    Hope this helps!

    Regards,
    Yutong

    -Please kindly accept the answer if you feel helpful, thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.