Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.6k stars 2.82k forks source link

Automl local and many model notebooks can fail with the most recent Compute Instance #28556

Open jeff-shepherd opened 1 year ago

jeff-shepherd commented 1 year ago

Describe the bug Local and many model automl V1 sample notebooks can fail on the latest Compute Instance. This includes:

To Reproduce Steps to reproduce the behavior:

  1. Create a new Compute Instance in eastus
  2. Clone the sample notebook local-run-classification-credit-card-fraud.ipynb
  3. Run all cells

Expected behavior The notebook should execute successfully but if fails with: Install the required versions of packages using the requirements file. Requirements file location: /anaconda/envs/azureml_py38/lib/python3.8/site-packages/azureml/automl/core/validated_linux_requirements.txt. Alternatively, use remote target to avoid dependency management. Required version/Installed version certifi<=2022.9.24/certifi 2022.12.7

The auto-ml-forecasting-backtest-many-models.ipynb notebook fails at "from azureml.contrib.automl.pipeline.steps import AutoMLPipelineBuilder" with: File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/azureml/training/tabular/models/forecasting_pipeline_wrapper.py:10 7 import uuid 8 from typing import Any, Dict, List, Optional, Tuple, Union, cast ---> 10 import nimbusml 11 import numpy as np 12 import pandas as pd File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/nimbusml/init.py:33 31 mode = oct(os.stat(dotso).st_mode & 0o777) 32 if mode != "0o755": ---> 33 os.chmod(dotso, 0o755) 35 # clean up the package namespace 36 del os, sys PermissionError: [Errno 1] Operation not permitted: '/anaconda/envs/azureml_py38/lib/python3.8/site-packages/nimbusml/internal/libs/pybridge.so'

jeff-shepherd commented 1 year ago

We are working to update the Compute Instance image to avoid this issue. It can be resolved by running the following command on the Compute Instance:

conda activate azureml_py38
pip install certifi==2022.9.24
sudo chmod 755 /anaconda/envs/azureml_py38/lib/python3.8/site-packages/nimbusml/internal/libs/pybridge.so
oluwatomsin commented 1 year ago

@jeff-shepherd Thanks for this. Was having the same issue and it worked.

vinodshanbhag commented 1 year ago

AzureML V1-SDK v1.49.0 has been released on Feb 13. Please make sure your environment is upgraded to latest version (v1.49.0 or above) to avoid "Operation not permitted" mentioned above. https://pypi.org/project/azureml-sdk/