Machinelearningnotebooks: ScriptRun sample from ref docs doesn't work

Created on 1 Apr 2020  Â·  10Comments  Â·  Source: Azure/MachineLearningNotebooks

I'm trying to run minimal code with azureml-core 1.3:

from azureml.core import Workspace, Experiment, ScriptRunConfig, RunConfiguration
ws = Workspace.from_config("config.json")
ex = Experiment(ws, "Repro")
ex.submit(ScriptRunConfig(
source_directory=".",
script="subdir/script.py",
run_config=RunConfiguration()))

The run fails with the following error:

UserError:
Unable to run conda package manager. AzureML uses conda to provision python
environments from a dependency specification. To manage the python environment
manually instead, set userManagedDependencies to True in the python environment
configuration. To use system managed python environments, install conda from:
https://conda.io/miniconda.html


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Environments MLOps awaiting-product-team-response machine-learninsvc product-question sdk-docs triaged

Most helpful comment

@vizhur, thank you for the links. The issue is about the documentation page though. The sample in the context of the documentation page is incomplete and confusing.

All 10 comments

@vassilyl Hi Vassily, are you using conda environment?

@vassilyl looks like you have a pirate version of AzureML SDK. We did not ship 1.3 yet :)

I guess you are trying to make a local run so you need conda in the path. If you want to run the script in your current python environment you need to set to True userManagedDependencies

https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.environment.pythonsection?view=azure-ml-py

and more samples referenced in Environment help page

https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.environment.environment?view=azure-ml-py

No. And if you dig deeper in documentation it's clear that the example tries to use local compute target. Neighter the page, nor the error message mentions this fact. Since this is not the main use case for AzureML SDK, I would change it to show setting a compute target.

Also, the "run_config=RunConfiguration()" argument seems to be redundant.

The version is 1.2, it's a typo, sorry.

@vizhur, thank you for the links. The issue is about the documentation page though. The sample in the context of the documentation page is incomplete and confusing.

@vassilyl I have created a ticket for that and tagged you. I agree the sample is a bit confusing

@vizhur Could we close this or you want to keep it opening? Thanks.

@YutongTie-MSFT it's not resolved yet, i'd keep it open unless @vassilyl is fine to close this as we have internal ticket filed

@vizhur has this been resolved

docs were updated

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmwoloso picture jmwoloso  Â·  4Comments

AakanchJoshi picture AakanchJoshi  Â·  4Comments

casieo picture casieo  Â·  4Comments

wagenrace picture wagenrace  Â·  3Comments

jarandaf picture jarandaf  Â·  4Comments