Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency failure running 03_CustomScript Forecast #147

Open
parasin opened this issue Jan 20, 2022 · 0 comments
Open

Dependency failure running 03_CustomScript Forecast #147

parasin opened this issue Jan 20, 2022 · 0 comments

Comments

@parasin
Copy link

parasin commented Jan 20, 2022

Steup and all previous notebooks run ok. Then at the Copy Predictions PythonScript step you get a failure with the following standard error: "[stderr]Traceback (most recent call last):
[stderr] File "copy_predictions.py", line 4, in
[stderr] import pandas as pd
[stderr]ModuleNotFoundError: No module named 'pandas'
[stderr]

Environment or Runconfig isn't set for this.

With some investigation error is at the Copy Predictions step in the 03_CustomScriptForecast notebook. I was able to remediate by creating a RunConfig and adding that to the PythonScriptStep.

from azureml.core.conda_dependencies import CondaDependencies
from azureml.core import RunConfiguration

conda_deps = CondaDependencies.create(pip_packages=['sklearn', 'pandas', 'joblib', 'azureml-defaults', 'azureml-core', 'azureml-dataprep[fuse]'])
run_config=RunConfiguration(conda_dependencies=conda_deps)

The following is the same but now with the added runconfig argument being set to the object

upload_predictions_step = PythonScriptStep(
name="copy_predictions",
script_name="copy_predictions.py",
compute_target=compute,
source_directory='./scripts',
inputs=[output_dref, output_dir],
runconfig=run_config,
allow_reuse=False,
arguments=['--parallel_run_step_output', output_dir,
'--output_dir', output_dref,
'--target_column', 'Quantity',
'--timestamp_column', 'WeekStarting',
'--timeseries_id_columns', 'Store', 'Brand']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant