diff --git a/.pipelines/azdo-ci-build-train.yml b/.pipelines/azdo-ci-build-train.yml index d1d95843..3dcc56bb 100644 --- a/.pipelines/azdo-ci-build-train.yml +++ b/.pipelines/azdo-ci-build-train.yml @@ -36,6 +36,7 @@ stages: # Invoke the Python building and publishing a training pipeline python $(Build.SourcesDirectory)/ml_service/pipelines/${{ variables.BUILD_TRAIN_SCRIPT }} displayName: 'Publish Azure Machine Learning Pipeline' + - stage: 'Trigger_AML_Pipeline' displayName: 'Train, evaluate, register model via previously published AML pipeline' jobs: @@ -84,6 +85,8 @@ stages: PipelineId: '$(AMLPIPELINE_ID)' ExperimentName: '$(EXPERIMENT_NAME)' PipelineParameters: '"ParameterAssignments": {"model_name": "$(MODEL_NAME)", "hyperparameter_alpha": "$(ALPHA)"}' + + - job: "Training_Run_Report" dependsOn: "Run_ML_Pipeline" displayName: "Determine if evaluation succeeded and new model is registered" diff --git a/code/evaluate/evaluate_model.py b/code/evaluate/evaluate_model.py index f59a87fd..f4291304 100644 --- a/code/evaluate/evaluate_model.py +++ b/code/evaluate/evaluate_model.py @@ -131,7 +131,7 @@ else: print("New trained model metric is less than or equal to " "production model so skipping model registration.") - run.parent.cancel() + # run.parent.cancel() else: print("This is the first model, " "thus it should be registered") diff --git a/code/scoring/conda_dependencies.yml b/code/scoring/conda_dependencies.yml index 41a05694..e2ac63b4 100644 --- a/code/scoring/conda_dependencies.yml +++ b/code/scoring/conda_dependencies.yml @@ -28,9 +28,9 @@ dependencies: - azureml-model-management-sdk==1.0.1b6.post1 - azureml-sdk==1.0.74 - scipy==1.3.1 - - scikit-learn==0.21.3 - - pandas==0.25.3 - - numpy==1.17.3 + - scikit-learn==0.22.1 + - pandas==1.0.0 + - numpy==1.18.1 - joblib==0.14.0 - gunicorn==19.9.0 - flask==1.1.1 diff --git a/tests/unit/code_test.py b/tests/unit/code_test.py index 06654b2f..750fada9 100644 --- a/tests/unit/code_test.py +++ b/tests/unit/code_test.py @@ -18,7 +18,7 @@ def test_train_model(): run = Mock(Run) reg = train_model(run, data, alpha=1.2) - run.log.assert_called_with("mse", 0.029843893480256872, + run.log.assert_called_with("mse", 0.029843893480257067, description='Mean squared error metric') preds = reg.predict([[1], [2]])