Addressing PR comments and using markers to invoke AML noebook tests
This commit is contained in:
Родитель
43e100ebdb
Коммит
d5bd4bc1f2
|
@ -4,9 +4,9 @@
|
|||
variables:
|
||||
- group: AzureMLConfig
|
||||
- name : 'resource_group'
|
||||
value : 'smoketest'
|
||||
value : 'amlnotebookrg'
|
||||
- name : 'workspace_name'
|
||||
value : 'smoketestws'
|
||||
value : 'amlnotebookws'
|
||||
- name : 'workspace_region'
|
||||
value : 'eastus2'
|
||||
trigger: none
|
||||
|
@ -27,7 +27,6 @@ steps:
|
|||
- bash: |
|
||||
conda env create -f environment.yml
|
||||
pip install paramiko==2.4.2
|
||||
pip install azureml-sdk
|
||||
source activate cv
|
||||
conda env list
|
||||
echo Login Azure Account
|
||||
|
@ -38,8 +37,8 @@ steps:
|
|||
- bash: |
|
||||
source activate cv
|
||||
python -m ipykernel install --user --name cv --display-name "cv"
|
||||
pytest -q --subscription_id=$(subscriptionid) --resource_group=$(resource_group) --workspace_name=$(workspace_name) --workspace_region=$(workspace_region) tests/smoke/test_azureml_notebooks.py
|
||||
displayName: 'Install azureml sdk and run azure ml smoke tests'
|
||||
pytest -q --subscription_id=$(subscriptionid) --resource_group=$(resource_group) --workspace_name=$(workspace_name) --workspace_region=$(workspace_region) -m azuremlnotebooks
|
||||
displayName: 'Run AzureML notebook tests'
|
||||
|
||||
|
||||
- bash: |
|
|
@ -1,29 +1,24 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
# This test is based on the test suite implemented for Recommenders project
|
||||
# https://github.com/Microsoft/Recommenders/tree/master/tests
|
||||
|
||||
import os
|
||||
import glob
|
||||
import papermill as pm
|
||||
import pytest
|
||||
import shutil
|
||||
|
||||
# Unless manually modified, python3 should be
|
||||
# Unless manually modified, cv should be
|
||||
# the name of the current jupyter kernel
|
||||
# that runs on the activated conda environment
|
||||
KERNEL_NAME = "cv"
|
||||
OUTPUT_NOTEBOOK = "output.ipynb"
|
||||
|
||||
@pytest.mark.azureml_notebook_test
|
||||
|
||||
@pytest.mark.azuremlnotebooks
|
||||
def test_20_notebook_run(
|
||||
classification_notebooks,
|
||||
subscription_id,
|
||||
resource_group,
|
||||
workspace_name,
|
||||
workspace_region
|
||||
):
|
||||
workspace_region,
|
||||
):
|
||||
notebook_path = classification_notebooks["20_azure_workspace_setup"]
|
||||
pm.execute_notebook(
|
||||
notebook_path,
|
||||
|
@ -33,20 +28,23 @@ def test_20_notebook_run(
|
|||
subscription_id=subscription_id,
|
||||
resource_group=resource_group,
|
||||
workspace_name=workspace_name,
|
||||
workspace_region=workspace_region
|
||||
workspace_region=workspace_region,
|
||||
),
|
||||
kernel_name=KERNEL_NAME,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.azureml_notebook_test
|
||||
@pytest.mark.azuremlnotebooks
|
||||
def test_21_notebook_run(
|
||||
classification_notebooks,
|
||||
subscription_id,
|
||||
resource_group,
|
||||
workspace_name,
|
||||
workspace_region):
|
||||
notebook_path = classification_notebooks["21_deployment_on_azure_container_instances"]
|
||||
workspace_region,
|
||||
):
|
||||
notebook_path = classification_notebooks[
|
||||
"21_deployment_on_azure_container_instances"
|
||||
]
|
||||
pm.execute_notebook(
|
||||
notebook_path,
|
||||
OUTPUT_NOTEBOOK,
|
||||
|
@ -55,18 +53,23 @@ def test_21_notebook_run(
|
|||
subscription_id=subscription_id,
|
||||
resource_group=resource_group,
|
||||
workspace_name=workspace_name,
|
||||
workspace_region=workspace_region),
|
||||
workspace_region=workspace_region,
|
||||
),
|
||||
kernel_name=KERNEL_NAME,
|
||||
)
|
||||
|
||||
@pytest.mark.azureml_notebook_test
|
||||
|
||||
@pytest.mark.azuremlnotebooks
|
||||
def test_22_notebook_run(
|
||||
classification_notebooks,
|
||||
subscription_id,
|
||||
resource_group,
|
||||
workspace_name,
|
||||
workspace_region):
|
||||
notebook_path = classification_notebooks["22_deployment_on_azure_kubernetes_service"]
|
||||
workspace_region,
|
||||
):
|
||||
notebook_path = classification_notebooks[
|
||||
"22_deployment_on_azure_kubernetes_service"
|
||||
]
|
||||
pm.execute_notebook(
|
||||
notebook_path,
|
||||
OUTPUT_NOTEBOOK,
|
||||
|
@ -75,17 +78,20 @@ def test_22_notebook_run(
|
|||
subscription_id=subscription_id,
|
||||
resource_group=resource_group,
|
||||
workspace_name=workspace_name,
|
||||
workspace_region=workspace_region),
|
||||
workspace_region=workspace_region,
|
||||
),
|
||||
kernel_name=KERNEL_NAME,
|
||||
)
|
||||
|
||||
@pytest.mark.azureml_notebook_test
|
||||
|
||||
@pytest.mark.azuremlnotebooks
|
||||
def test_23_notebook_run(
|
||||
classification_notebooks,
|
||||
subscription_id,
|
||||
resource_group,
|
||||
workspace_name,
|
||||
workspace_region):
|
||||
workspace_region,
|
||||
):
|
||||
notebook_path = classification_notebooks["23_aci_aks_web_service_testing"]
|
||||
pm.execute_notebook(
|
||||
notebook_path,
|
||||
|
@ -95,6 +101,7 @@ def test_23_notebook_run(
|
|||
subscription_id=subscription_id,
|
||||
resource_group=resource_group,
|
||||
workspace_name=workspace_name,
|
||||
workspace_region=workspace_region),
|
||||
workspace_region=workspace_region,
|
||||
),
|
||||
kernel_name=KERNEL_NAME,
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче