MicrosoftLearning / mslearn-azure-ml

https://microsoftlearning.github.io/mslearn-azure-ml/
MIT License
188 stars 209 forks source link

Lab py files failing in the terminal #96

Closed adamlimsft closed 1 month ago

adamlimsft commented 2 months ago

Module: Run a training script as a command job in Azure Machine Learning

Lab/Demo: Run a training script as a command job in Azure Machine Learning

Task: Convert a notebook to a script

Step: 09 The script is initiated by the command python train-classification-model.py.

Task: Test a script with the terminal

Step: 03 python train-model-parameters.py --training_data diabetes.csv The script should successfully run and as a result, the output should show the accuracy and AUC of the trained model.

Description of issue: train-classification-model.py and train-model-parameters.py script both fail when running in the terminal.

Repro steps:

  1. Run the py script in terminal. Other MTTs also confirmed that they run into same error. image
afelix-95 commented 2 months ago

@adamlimsft, @madiepev I tested the lab and it is an issue of outdated library in the Anaconda environment. It's a product issue but we can manually fix it by adding a repository with the latest versions of the library, updating the package list and upgrading the libstdc++6 package:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade libstdc++6
Jason-Microsoft-MTT commented 2 months ago

@afelix-95 nice catch, I found that solution myself (thanks to copilot). Only addition I will make is that to make sure you are executing these commands in the terminal when you are uninstalling/reinstalling the azure ai-ml package (Task: Clone the lab materials Step 6) and it does take about 5 minutes for these updates to happen.

chris-utter commented 1 month ago

Thanks @afelix-95 I ran into this today (9/11/24). I recommend adding these steps to the instructions somewhere until the environment is updated.

chris-utter commented 1 month ago

I received the following error when running the first command line (sudo add-apt-repository ppa:ubuntu-toolchain-r/test):

The following signatures were invalid: EXPKEYSIG 544B7F63BF9E4D5F Tensorflow Serving Developer (Tensorflow Serving APT repository key) tensorflow-serving-dev@googlegroups.com Hit:20 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease Fetched 1484 B in 2s (739 B/s) Reading package lists... Done W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://storage.googleapis.com/tensorflow-serving-apt stable InRelease: The following signatures were invalid: EXPKEYSIG 544B7F63BF9E4D5F Tensorflow Serving Developer (Tensorflow Serving APT repository key) tensorflow-serving-dev@googlegroups.com W: Failed to fetch https://storage.googleapis.com/tensorflow-serving-apt/dists/stable/InRelease The following signatures were invalid: EXPKEYSIG 544B7F63BF9E4D5F Tensorflow Serving Developer (Tensorflow Serving APT repository key) tensorflow-serving-dev@googlegroups.com W: Some index files failed to download. They have been ignored, or old ones used instead.

afelix-95 commented 1 month ago

@chris-utter you can ignore those errors as the required files for updating the library are downloaded anyway. You can still run the other commands and they'll execute without any issues.