From 8a34b52190bc2c039325ecfe20d45faaff55a953 Mon Sep 17 00:00:00 2001 From: nick863 <30440255+nick863@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:30:41 -0700 Subject: [PATCH] Fix multilabel notebook to work with the new scikit-learn (#2563) * Fix notebook * Fix notbook gate * Fix notebook runs * Fix workspaces * Fix multiclass/multilabel runs. --- .../workflows/python-sdk-tutorial-automl-nlp-multiclass.yml | 6 +++--- .../workflows/python-sdk-tutorial-automl-nlp-multilabel.yml | 6 +++--- .../automl-nlp-multiclass/update_env.yml | 6 ++---- .../automl-nlp-text-classification-multilabel.ipynb | 2 +- .../automl-nlp-multilabel/update_env.yml | 6 ++---- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/python-sdk-tutorial-automl-nlp-multiclass.yml b/.github/workflows/python-sdk-tutorial-automl-nlp-multiclass.yml index 78d3555936..82add38b20 100644 --- a/.github/workflows/python-sdk-tutorial-automl-nlp-multiclass.yml +++ b/.github/workflows/python-sdk-tutorial-automl-nlp-multiclass.yml @@ -11,7 +11,7 @@ on: - .github/workflows/python-sdk-tutorial-automl-nlp-multiclass.yml jobs: build: - runs-on: ubuntu-latest + runs-on: ${{vars.V1_UBUNTU_RUNNER}} defaults: run: shell: bash -l {0} @@ -46,14 +46,14 @@ jobs: - name: azure login uses: azure/login@v1 with: - creds: ${{secrets.AZ_AE_CREDS}} + creds: ${{secrets.AZUREML_CREDENTIALS}} - name: Run update-azure-extensions run: | chmod +x ./v1/scripts/update-azure-extensions.sh ./v1/scripts/update-azure-extensions.sh shell: bash - name: attach to workspace - run: az ml folder attach -w main-python-sdk -g azureml-examples-rg + run: az ml folder attach -w main -g azureml-examples - name: run automl-nlp-text-classification-multiclass.ipynb run: papermill -k python automl-nlp-text-classification-multiclass.ipynb automl-nlp-text-classification-multiclass.output.ipynb working-directory: v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multiclass/ diff --git a/.github/workflows/python-sdk-tutorial-automl-nlp-multilabel.yml b/.github/workflows/python-sdk-tutorial-automl-nlp-multilabel.yml index b76c5f7b4d..b45f2379ff 100644 --- a/.github/workflows/python-sdk-tutorial-automl-nlp-multilabel.yml +++ b/.github/workflows/python-sdk-tutorial-automl-nlp-multilabel.yml @@ -11,7 +11,7 @@ on: - .github/workflows/python-sdk-tutorial-automl-nlp-multilabel.yml jobs: build: - runs-on: ubuntu-latest + runs-on: ${{vars.V1_UBUNTU_RUNNER}} defaults: run: shell: bash -l {0} @@ -46,14 +46,14 @@ jobs: - name: azure login uses: azure/login@v1 with: - creds: ${{secrets.AZ_AE_CREDS}} + creds: ${{secrets.AZUREML_CREDENTIALS}} - name: Run update-azure-extensions run: | chmod +x ./v1/scripts/update-azure-extensions.sh ./v1/scripts/update-azure-extensions.sh shell: bash - name: attach to workspace - run: az ml folder attach -w main-python-sdk -g azureml-examples-rg + run: az ml folder attach -w main -g azureml-examples - name: run automl-nlp-text-classification-multilabel.ipynb run: papermill -k python automl-nlp-text-classification-multilabel.ipynb automl-nlp-text-classification-multilabel.output.ipynb working-directory: v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/ diff --git a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multiclass/update_env.yml b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multiclass/update_env.yml index 79fe2c8733..7e39f8f792 100644 --- a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multiclass/update_env.yml +++ b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multiclass/update_env.yml @@ -1,7 +1,5 @@ dependencies: -- pytorch==1.7.1 -- numpy==1.18.5 -- pandas~=1.1.5 +- pytorch==1.12.0 - pip: - - azureml-automl-dnn-nlp==1.39.0 \ No newline at end of file + - azureml-automl-dnn-nlp==1.52.0 \ No newline at end of file diff --git a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/automl-nlp-text-classification-multilabel.ipynb b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/automl-nlp-text-classification-multilabel.ipynb index 2ad0883cc4..9e9e184b98 100644 --- a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/automl-nlp-text-classification-multilabel.ipynb +++ b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/automl-nlp-text-classification-multilabel.ipynb @@ -578,7 +578,7 @@ " y_true.append(label_set[ind] if label else \"\")\n", " y_pred.append(label_set[ind] if predict_positive else \"\")\n", "\n", - " print(classification_report(y_true, y_pred, label_set))" + " print(classification_report(y_true=y_true, y_pred=y_pred, labels=label_set))" ] }, { diff --git a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/update_env.yml b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/update_env.yml index 79fe2c8733..7e39f8f792 100644 --- a/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/update_env.yml +++ b/v1/python-sdk/tutorials/automl-with-azureml/automl-nlp-multilabel/update_env.yml @@ -1,7 +1,5 @@ dependencies: -- pytorch==1.7.1 -- numpy==1.18.5 -- pandas~=1.1.5 +- pytorch==1.12.0 - pip: - - azureml-automl-dnn-nlp==1.39.0 \ No newline at end of file + - azureml-automl-dnn-nlp==1.52.0 \ No newline at end of file