diff --git a/.github/workflows/automated-cleanup-resources.yml b/.github/workflows/automated-cleanup-resources.yml index 0b16036ec9..393fc52b2d 100644 --- a/.github/workflows/automated-cleanup-resources.yml +++ b/.github/workflows/automated-cleanup-resources.yml @@ -24,7 +24,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: azure login uses: azure/login@v1 with: diff --git a/.github/workflows/bootstrapping-infra.yml b/.github/workflows/bootstrapping-infra.yml index 0fa746a8b0..a9583af5cf 100644 --- a/.github/workflows/bootstrapping-infra.yml +++ b/.github/workflows/bootstrapping-infra.yml @@ -42,7 +42,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/bootstrapping-resources.yml b/.github/workflows/bootstrapping-resources.yml index 7a21e94d78..5a8c55302c 100644 --- a/.github/workflows/bootstrapping-resources.yml +++ b/.github/workflows/bootstrapping-resources.yml @@ -25,7 +25,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login @@ -228,4 +228,4 @@ jobs: # bash "$SCRIPT_DIR"/sdk_helpers.sh install_azcopy bash "$SCRIPT_DIR"/sdk_helpers.sh copy_dataset working-directory: infra/bootstrapping - continue-on-error: true \ No newline at end of file + continue-on-error: true diff --git a/.github/workflows/sdk-assets-assets-in-registry-share-data-using-registry.yml b/.github/workflows/sdk-assets-assets-in-registry-share-data-using-registry.yml index fed21f71b2..3a77848d6d 100644 --- a/.github/workflows/sdk-assets-assets-in-registry-share-data-using-registry.yml +++ b/.github/workflows/sdk-assets-assets-in-registry-share-data-using-registry.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-assets-in-registry-share-models-components-environments.yml b/.github/workflows/sdk-assets-assets-in-registry-share-models-components-environments.yml index 291900f03c..f554924d5e 100644 --- a/.github/workflows/sdk-assets-assets-in-registry-share-models-components-environments.yml +++ b/.github/workflows/sdk-assets-assets-in-registry-share-models-components-environments.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-component-component.yml b/.github/workflows/sdk-assets-component-component.yml index d0b30fdce1..8d937240a7 100644 --- a/.github/workflows/sdk-assets-component-component.yml +++ b/.github/workflows/sdk-assets-component-component.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-data-data.yml b/.github/workflows/sdk-assets-data-data.yml index 306b21c08a..b89ab9c5f1 100644 --- a/.github/workflows/sdk-assets-data-data.yml +++ b/.github/workflows/sdk-assets-data-data.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-data-versioning.yml b/.github/workflows/sdk-assets-data-versioning.yml index 05cb87bd8a..0d4364e3d7 100644 --- a/.github/workflows/sdk-assets-data-versioning.yml +++ b/.github/workflows/sdk-assets-data-versioning.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install --no-cache-dir -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-data-working_with_mltable.yml b/.github/workflows/sdk-assets-data-working_with_mltable.yml index f887ed94ff..719cfdc59e 100644 --- a/.github/workflows/sdk-assets-data-working_with_mltable.yml +++ b/.github/workflows/sdk-assets-data-working_with_mltable.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-environment-environment.yml b/.github/workflows/sdk-assets-environment-environment.yml index cab2b51cfc..b3551b847e 100644 --- a/.github/workflows/sdk-assets-environment-environment.yml +++ b/.github/workflows/sdk-assets-environment-environment.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-assets-model-model.yml b/.github/workflows/sdk-assets-model-model.yml index 631d50b7cc..3bc40bb8ed 100644 --- a/.github/workflows/sdk-assets-model-model.yml +++ b/.github/workflows/sdk-assets-model-model.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-batch.yml b/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-batch.yml index 4c5f56258c..c02765db19 100644 --- a/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-batch.yml +++ b/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-batch.yml @@ -86,6 +86,7 @@ jobs: bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json"; bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" replace_template_values "imagenet-classifier-batch.ipynb"; [ -f "../../.azureml/config" ] && cat "../../.azureml/config"; + python -m pip install --upgrade "protobuf>=6.31.1,<8.0.0" papermill -k python imagenet-classifier-batch.ipynb imagenet-classifier-batch.output.ipynb --log-output working-directory: sdk/python/endpoints/batch/deploy-models/imagenet-classifier - name: upload notebook's working folder as an artifact diff --git a/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-mlflow.yml b/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-mlflow.yml index 17179937bc..178777cea5 100644 --- a/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-mlflow.yml +++ b/.github/workflows/sdk-endpoints-batch-deploy-models-imagenet-classifier-imagenet-classifier-mlflow.yml @@ -89,6 +89,7 @@ jobs: bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" generate_workspace_config "../../.azureml/config.json"; bash "${{ github.workspace }}/infra/bootstrapping/sdk_helpers.sh" replace_template_values "imagenet-classifier-mlflow.ipynb"; [ -f "../../.azureml/config" ] && cat "../../.azureml/config"; + python -m pip install --upgrade "protobuf>=6.31.1,<8.0.0" papermill -k python imagenet-classifier-mlflow.ipynb imagenet-classifier-mlflow.output.ipynb --log-output working-directory: sdk/python/endpoints/batch/deploy-models/imagenet-classifier - name: upload notebook's working folder as an artifact diff --git a/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml b/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml index ae2d19d9ed..1269dd5304 100644 --- a/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml +++ b/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml b/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml index 12cf1015c7..c672fafc01 100644 --- a/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml +++ b/.github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml b/.github/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml index a07313df7a..3b9a9afbbf 100644 --- a/.github/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml +++ b/.github/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml b/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml index 27a6d1295b..266ed8ca36 100644 --- a/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml +++ b/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml b/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml index 6c5152a719..8554096ce8 100644 --- a/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml +++ b/.github/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-binary-payloads.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-binary-payloads.yml index 1806972a42..45272f3072 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-binary-payloads.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-binary-payloads.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-inference-schema.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-inference-schema.yml index 73f3a02da5..78278f29a6 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-inference-schema.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-inference-schema.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-keyvault.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-keyvault.yml index 3fe5f7e624..a5dc5dccca 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-keyvault.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-keyvault.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml index 56eb7e62b6..c30f3dc625 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-openapi.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-openapi.yml index a35a5b3ab0..f4ec87ed48 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-openapi.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-openapi.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml index 1643cd653f..67dda0669c 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml index 806f7899b2..6c680d4db4 100644 --- a/.github/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml +++ b/.github/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model.yml b/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model.yml index e052006137..59a7bcad12 100644 --- a/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model.yml +++ b/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model.yml @@ -33,7 +33,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model_image_tasks.yml b/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model_image_tasks.yml index f9b4ae8108..b0d95bdc29 100644 --- a/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model_image_tasks.yml +++ b/.github/workflows/sdk-foundation-models-system-import-import_model_into_registry_new_model_image_tasks.yml @@ -33,7 +33,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1a_pipeline_with_components_from_yaml-pipeline_with_components_from_yaml.yml b/.github/workflows/sdk-jobs-pipelines-1a_pipeline_with_components_from_yaml-pipeline_with_components_from_yaml.yml index 99a27a5d60..d7efb83187 100644 --- a/.github/workflows/sdk-jobs-pipelines-1a_pipeline_with_components_from_yaml-pipeline_with_components_from_yaml.yml +++ b/.github/workflows/sdk-jobs-pipelines-1a_pipeline_with_components_from_yaml-pipeline_with_components_from_yaml.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1b_pipeline_with_python_function_components-pipeline_with_python_function_components.yml b/.github/workflows/sdk-jobs-pipelines-1b_pipeline_with_python_function_components-pipeline_with_python_function_components.yml index 401fac7113..50ac215984 100644 --- a/.github/workflows/sdk-jobs-pipelines-1b_pipeline_with_python_function_components-pipeline_with_python_function_components.yml +++ b/.github/workflows/sdk-jobs-pipelines-1b_pipeline_with_python_function_components-pipeline_with_python_function_components.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1c_pipeline_with_hyperparameter_sweep-pipeline_with_hyperparameter_sweep.yml b/.github/workflows/sdk-jobs-pipelines-1c_pipeline_with_hyperparameter_sweep-pipeline_with_hyperparameter_sweep.yml index 5ec9b99fbb..09ca6883af 100644 --- a/.github/workflows/sdk-jobs-pipelines-1c_pipeline_with_hyperparameter_sweep-pipeline_with_hyperparameter_sweep.yml +++ b/.github/workflows/sdk-jobs-pipelines-1c_pipeline_with_hyperparameter_sweep-pipeline_with_hyperparameter_sweep.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1d_pipeline_with_non_python_components-pipeline_with_non_python_components.yml b/.github/workflows/sdk-jobs-pipelines-1d_pipeline_with_non_python_components-pipeline_with_non_python_components.yml index fb245b4818..869231d783 100644 --- a/.github/workflows/sdk-jobs-pipelines-1d_pipeline_with_non_python_components-pipeline_with_non_python_components.yml +++ b/.github/workflows/sdk-jobs-pipelines-1d_pipeline_with_non_python_components-pipeline_with_non_python_components.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1e_pipeline_with_registered_components-pipeline_with_registered_components.yml b/.github/workflows/sdk-jobs-pipelines-1e_pipeline_with_registered_components-pipeline_with_registered_components.yml index 97862b0ca8..3364ccb358 100644 --- a/.github/workflows/sdk-jobs-pipelines-1e_pipeline_with_registered_components-pipeline_with_registered_components.yml +++ b/.github/workflows/sdk-jobs-pipelines-1e_pipeline_with_registered_components-pipeline_with_registered_components.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1g_pipeline_with_parallel_nodes-pipeline_with_parallel_nodes.yml b/.github/workflows/sdk-jobs-pipelines-1g_pipeline_with_parallel_nodes-pipeline_with_parallel_nodes.yml index d2a920cbde..86fe53030a 100644 --- a/.github/workflows/sdk-jobs-pipelines-1g_pipeline_with_parallel_nodes-pipeline_with_parallel_nodes.yml +++ b/.github/workflows/sdk-jobs-pipelines-1g_pipeline_with_parallel_nodes-pipeline_with_parallel_nodes.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1i_pipeline_with_spark_nodes-pipeline_with_spark_nodes.yml b/.github/workflows/sdk-jobs-pipelines-1i_pipeline_with_spark_nodes-pipeline_with_spark_nodes.yml index 69056770ca..ed3766f3e9 100644 --- a/.github/workflows/sdk-jobs-pipelines-1i_pipeline_with_spark_nodes-pipeline_with_spark_nodes.yml +++ b/.github/workflows/sdk-jobs-pipelines-1i_pipeline_with_spark_nodes-pipeline_with_spark_nodes.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component.yml b/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component.yml index 2e68689874..6ba5cdae25 100644 --- a/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component.yml +++ b/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component-nyc_taxi_data_regression_with_pipeline_component.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-pipeline_with_train_eval_pipeline_component-pipeline_with_train_eval_pipeline_component.yml b/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-pipeline_with_train_eval_pipeline_component-pipeline_with_train_eval_pipeline_component.yml index 4319564eaa..318eb4e510 100644 --- a/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-pipeline_with_train_eval_pipeline_component-pipeline_with_train_eval_pipeline_component.yml +++ b/.github/workflows/sdk-jobs-pipelines-1j_pipeline_with_pipeline_component-pipeline_with_train_eval_pipeline_component-pipeline_with_train_eval_pipeline_component.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-1l_flow_in_pipeline-flow_in_pipeline.yml b/.github/workflows/sdk-jobs-pipelines-1l_flow_in_pipeline-flow_in_pipeline.yml index 74c3453b02..3cd4ee79d7 100644 --- a/.github/workflows/sdk-jobs-pipelines-1l_flow_in_pipeline-flow_in_pipeline.yml +++ b/.github/workflows/sdk-jobs-pipelines-1l_flow_in_pipeline-flow_in_pipeline.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-2a_train_mnist_with_tensorflow-train_mnist_with_tensorflow.yml b/.github/workflows/sdk-jobs-pipelines-2a_train_mnist_with_tensorflow-train_mnist_with_tensorflow.yml index 9e9593a3ce..b56b49baeb 100644 --- a/.github/workflows/sdk-jobs-pipelines-2a_train_mnist_with_tensorflow-train_mnist_with_tensorflow.yml +++ b/.github/workflows/sdk-jobs-pipelines-2a_train_mnist_with_tensorflow-train_mnist_with_tensorflow.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-2b_train_cifar_10_with_pytorch-train_cifar_10_with_pytorch.yml b/.github/workflows/sdk-jobs-pipelines-2b_train_cifar_10_with_pytorch-train_cifar_10_with_pytorch.yml index d4099d1e74..a6dcab9844 100644 --- a/.github/workflows/sdk-jobs-pipelines-2b_train_cifar_10_with_pytorch-train_cifar_10_with_pytorch.yml +++ b/.github/workflows/sdk-jobs-pipelines-2b_train_cifar_10_with_pytorch-train_cifar_10_with_pytorch.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-2c_nyc_taxi_data_regression-nyc_taxi_data_regression.yml b/.github/workflows/sdk-jobs-pipelines-2c_nyc_taxi_data_regression-nyc_taxi_data_regression.yml index f46b1ba7d2..0a7896fcaa 100644 --- a/.github/workflows/sdk-jobs-pipelines-2c_nyc_taxi_data_regression-nyc_taxi_data_regression.yml +++ b/.github/workflows/sdk-jobs-pipelines-2c_nyc_taxi_data_regression-nyc_taxi_data_regression.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-2d_image_classification_with_densenet-image_classification_with_densenet.yml b/.github/workflows/sdk-jobs-pipelines-2d_image_classification_with_densenet-image_classification_with_densenet.yml index 02ba29676d..ddd3d8fefe 100644 --- a/.github/workflows/sdk-jobs-pipelines-2d_image_classification_with_densenet-image_classification_with_densenet.yml +++ b/.github/workflows/sdk-jobs-pipelines-2d_image_classification_with_densenet-image_classification_with_densenet.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-jobs-pipelines-2e_image_classification_keras_minist_convnet-image_classification_keras_minist_convnet.yml b/.github/workflows/sdk-jobs-pipelines-2e_image_classification_keras_minist_convnet-image_classification_keras_minist_convnet.yml index fe4879d38e..d4210e7b58 100644 --- a/.github/workflows/sdk-jobs-pipelines-2e_image_classification_keras_minist_convnet-image_classification_keras_minist_convnet.yml +++ b/.github/workflows/sdk-jobs-pipelines-2e_image_classification_keras_minist_convnet-image_classification_keras_minist_convnet.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-resources-connections-connections.yml b/.github/workflows/sdk-resources-connections-connections.yml index cd1a5fed47..f0a1a05317 100644 --- a/.github/workflows/sdk-resources-connections-connections.yml +++ b/.github/workflows/sdk-resources-connections-connections.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-resources-registry-registry-create.yml b/.github/workflows/sdk-resources-registry-registry-create.yml index 93729afeaa..0d5fba22a3 100644 --- a/.github/workflows/sdk-resources-registry-registry-create.yml +++ b/.github/workflows/sdk-resources-registry-registry-create.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/sdk-schedules-job-schedule.yml b/.github/workflows/sdk-schedules-job-schedule.yml index 3be006164d..2de5b27d5f 100644 --- a/.github/workflows/sdk-schedules-job-schedule.yml +++ b/.github/workflows/sdk-schedules-job-schedule.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.10" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml b/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml index 827d2bc8c5..1f5f7be09e 100644 --- a/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml +++ b/.github/workflows/tutorials-azureml-getting-started-azureml-getting-started-studio.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml b/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml index e7ab0b663a..ef00939cfb 100644 --- a/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml +++ b/.github/workflows/tutorials-azureml-in-a-day-azureml-in-a-day.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml b/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml index d3e4e91dbb..8efc3a8f88 100644 --- a/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml +++ b/.github/workflows/tutorials-e2e-distributed-pytorch-image-e2e-object-classification-distributed-pytorch.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml b/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml index 4edf19a566..841b652c82 100644 --- a/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml +++ b/.github/workflows/tutorials-e2e-ds-experience-e2e-ml-workflow.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml b/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml index e0d16d4906..17dd7dceea 100644 --- a/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml +++ b/.github/workflows/tutorials-get-started-notebooks-cloud-workstation.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml b/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml index 1661957428..d3ce49c90f 100644 --- a/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml +++ b/.github/workflows/tutorials-get-started-notebooks-deploy-model.yml @@ -32,8 +32,8 @@ jobs: uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v2 - with: - python-version: "3.8" + with: + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/tutorials-get-started-notebooks-explore-data.yml b/.github/workflows/tutorials-get-started-notebooks-explore-data.yml index 339c26fcdc..76a76fb004 100644 --- a/.github/workflows/tutorials-get-started-notebooks-explore-data.yml +++ b/.github/workflows/tutorials-get-started-notebooks-explore-data.yml @@ -32,8 +32,8 @@ jobs: uses: actions/checkout@v2 - name: setup python uses: actions/setup-python@v2 - with: - python-version: "3.8" + with: + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: azure login diff --git a/.github/workflows/tutorials-get-started-notebooks-pipeline.yml b/.github/workflows/tutorials-get-started-notebooks-pipeline.yml index 22c2d75fec..166b2d1376 100644 --- a/.github/workflows/tutorials-get-started-notebooks-pipeline.yml +++ b/.github/workflows/tutorials-get-started-notebooks-pipeline.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-get-started-notebooks-quickstart.yml b/.github/workflows/tutorials-get-started-notebooks-quickstart.yml index 7d6f3b475c..e043afeda0 100644 --- a/.github/workflows/tutorials-get-started-notebooks-quickstart.yml +++ b/.github/workflows/tutorials-get-started-notebooks-quickstart.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/.github/workflows/tutorials-get-started-notebooks-train-model.yml b/.github/workflows/tutorials-get-started-notebooks-train-model.yml index 29489e25dc..0c6f8ec110 100644 --- a/.github/workflows/tutorials-get-started-notebooks-train-model.yml +++ b/.github/workflows/tutorials-get-started-notebooks-train-model.yml @@ -34,7 +34,7 @@ jobs: - name: setup python uses: actions/setup-python@v2 with: - python-version: "3.8" + python-version: "3.13" - name: pip install notebook reqs run: pip install -r sdk/python/dev-requirements.txt - name: pip install mlflow reqs diff --git a/sdk/python/assets/assets-in-registry/share-data-using-registry.ipynb b/sdk/python/assets/assets-in-registry/share-data-using-registry.ipynb index 10462deb3d..125da7f57e 100644 --- a/sdk/python/assets/assets-in-registry/share-data-using-registry.ipynb +++ b/sdk/python/assets/assets-in-registry/share-data-using-registry.ipynb @@ -155,7 +155,7 @@ "outputs": [], "source": [ "import time\n", - "import sys\n", + "import os\n", "\n", "# version = str(123456)\n", "version = str(int(time.time()))\n", @@ -163,7 +163,7 @@ "\n", "parent_dir = os.path.abspath(\n", " os.path.join(\n", - " sys.path[0],\n", + " os.getcwd(),\n", " \"../../../../cli/jobs/pipelines-with-components/nyc_taxi_data_regression\",\n", " )\n", ")" diff --git a/sdk/python/assets/assets-in-registry/share-models-components-environments.ipynb b/sdk/python/assets/assets-in-registry/share-models-components-environments.ipynb index 8c0e3adb08..f4ea2c4eb9 100644 --- a/sdk/python/assets/assets-in-registry/share-models-components-environments.ipynb +++ b/sdk/python/assets/assets-in-registry/share-models-components-environments.ipynb @@ -136,7 +136,7 @@ "outputs": [], "source": [ "import time\n", - "import sys\n", + "import os\n", "\n", "# version = str(123456)\n", "version = str(int(time.time()))\n", @@ -144,7 +144,7 @@ "\n", "parent_dir = os.path.abspath(\n", " os.path.join(\n", - " sys.path[0],\n", + " os.getcwd(),\n", " \"../../../../cli/jobs/pipelines-with-components/nyc_taxi_data_regression\",\n", " )\n", ")" diff --git a/sdk/python/dev-requirements.txt b/sdk/python/dev-requirements.txt index ab8ea27414..c031b2bf2d 100644 --- a/sdk/python/dev-requirements.txt +++ b/sdk/python/dev-requirements.txt @@ -1,13 +1,18 @@ # required for notebook testing in workflow actions # pinned to avoid surprises +# All versions tested locally for Python 3.13 compatibility ipython-genutils==0.2.0 -ipykernel==5.5.5 -papermill==2.3.3 -pandas==2.0.3 -matplotlib==3.7.3 -torch==2.1.0 -tensorflow==2.12.0 -tensorflow-hub==0.15.0 -transformers==4.34.0 -keras==2.12.0 -jupyter-client==7.4.9 +ipykernel==6.29.5 +papermill==2.6.0 +pandas==2.3.3 +matplotlib==3.9.0 +torch==2.13.0 +tensorflow==2.21.0 +tensorflow-hub==0.16.1 +jupyter-client==8.9.0 +protobuf>=6.31.1,<8.0.0 + +# Note: azureml-fsspec and transformers are NOT included here due to dependency conflicts +# Notebooks that need them install inline: +# - transformers: %pip install transformers==4.35.2 +# - azureml-fsspec: %pip install -U azureml-fsspec diff --git a/sdk/python/endpoints/batch/deploy-models/huggingface-text-summarization/text-summarization-batch.ipynb b/sdk/python/endpoints/batch/deploy-models/huggingface-text-summarization/text-summarization-batch.ipynb index 3f1eaced44..c9f11ad1f5 100644 --- a/sdk/python/endpoints/batch/deploy-models/huggingface-text-summarization/text-summarization-batch.ipynb +++ b/sdk/python/endpoints/batch/deploy-models/huggingface-text-summarization/text-summarization-batch.ipynb @@ -163,6 +163,24 @@ "- We are going to use TensorFlow as a backend." ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install \"protobuf>=6.31.1,<8.0.0\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install transformers==4.35.2" + ] + }, { "cell_type": "code", "execution_count": null, @@ -179,6 +197,8 @@ }, "outputs": [], "source": [ + "%pip install \"protobuf>=6.31.1,<8.0.0\" transformers==4.35.2\n", + "\n", "from transformers import pipeline\n", "\n", "summarizer = pipeline(\"summarization\", model=\"facebook/bart-large-cnn\", framework=\"pt\")" diff --git a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-batch/batch_driver.py b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-batch/batch_driver.py index 12d6a2cff7..c2ea5d56f8 100644 --- a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-batch/batch_driver.py +++ b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-batch/batch_driver.py @@ -1,7 +1,11 @@ import os +# Required before importing tensorflow when model was saved with legacy tf.keras behavior. +os.environ.setdefault("TF_USE_LEGACY_KERAS", "1") + import numpy as np import pandas as pd import tensorflow as tf +import tensorflow_hub as hub from tensorflow.keras.models import load_model @@ -13,8 +17,8 @@ def init(): # AZUREML_MODEL_DIR is an environment variable created during deployment model_path = os.path.join(os.environ["AZUREML_MODEL_DIR"], "model") - # load the model - model = load_model(model_path) + # Load with TF Hub custom object registration for KerasLayer deserialization. + model = load_model(model_path, custom_objects={"KerasLayer": hub.KerasLayer}) input_width = 244 input_height = 244 diff --git a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-file/batch_driver.py b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-file/batch_driver.py index c553f777e2..8797f27f20 100644 --- a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-file/batch_driver.py +++ b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/code/score-by-file/batch_driver.py @@ -1,7 +1,11 @@ import os +# Required before importing tensorflow when model was saved with legacy tf.keras behavior. +os.environ.setdefault("TF_USE_LEGACY_KERAS", "1") + import numpy as np import pandas as pd import tensorflow as tf +import tensorflow_hub as hub from os.path import basename from PIL import Image from tensorflow.keras.models import load_model @@ -15,8 +19,8 @@ def init(): # AZUREML_MODEL_DIR is an environment variable created during deployment model_path = os.path.join(os.environ["AZUREML_MODEL_DIR"], "model") - # load the model - model = load_model(model_path) + # Load with TF Hub custom object registration for KerasLayer deserialization. + model = load_model(model_path, custom_objects={"KerasLayer": hub.KerasLayer}) input_width = 244 input_height = 244 diff --git a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/environment/conda.yaml b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/environment/conda.yaml index 2ec540e4fe..7065aafc3e 100644 --- a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/environment/conda.yaml +++ b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/environment/conda.yaml @@ -2,11 +2,13 @@ name: tensorflow-env channels: - conda-forge dependencies: - - python=3.8.5 + - python=3.10 - pip - pip: - pandas - tensorflow + - tf-keras + - tensorflow-hub==0.16.1 - pillow - azureml-core - azureml-dataset-runtime[fuse] diff --git a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-batch.ipynb b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-batch.ipynb index 542912b981..f34f173b71 100644 --- a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-batch.ipynb +++ b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-batch.ipynb @@ -175,8 +175,13 @@ }, "outputs": [], "source": [ - "import tensorflow_hub as hub\n", + "%pip install \"protobuf>=6.31.1,<8.0.0\" \"tensorflow-hub==0.16.1\" \"tf-keras==2.21.0\"\n", + "\n", + "import os\n", + "os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n", + "\n", "import tensorflow as tf\n", + "import tensorflow_hub as hub\n", "\n", "model = tf.keras.Sequential(\n", " [\n", @@ -590,9 +595,13 @@ "%%writefile code/score-by-file/batch_driver.py\n", "\n", "import os\n", + "# Required before importing tensorflow when model was saved with legacy tf.keras behavior.\n", + "os.environ.setdefault(\"TF_USE_LEGACY_KERAS\", \"1\")\n", + "\n", "import numpy as np\n", "import pandas as pd\n", "import tensorflow as tf\n", + "import tensorflow_hub as hub\n", "from os.path import basename\n", "from PIL import Image\n", "from tensorflow.keras.models import load_model\n", @@ -606,8 +615,8 @@ " # AZUREML_MODEL_DIR is an environment variable created during deployment\n", " model_path = os.path.join(os.environ[\"AZUREML_MODEL_DIR\"], \"model\")\n", "\n", - " # load the model\n", - " model = load_model(model_path)\n", + " # Load with TF Hub custom object registration for KerasLayer deserialization.\n", + " model = load_model(model_path, custom_objects={\"KerasLayer\": hub.KerasLayer})\n", " input_width = 244\n", " input_height = 244\n", "\n", @@ -765,6 +774,7 @@ " endpoint_name=endpoint.name,\n", " model=model,\n", " environment=environment,\n", + " environment_variables={\"TF_USE_LEGACY_KERAS\": \"1\"},\n", " code_configuration=CodeConfiguration(\n", " code=\"code/score-by-file\",\n", " scoring_script=\"batch_driver.py\",\n", @@ -776,7 +786,7 @@ " mini_batch_size=10,\n", " output_action=BatchDeploymentOutputAction.APPEND_ROW,\n", " output_file_name=\"predictions.csv\",\n", - " retry_settings=BatchRetrySettings(max_retries=3, timeout=300),\n", + " retry_settings=BatchRetrySettings(max_retries=5, timeout=1800),\n", " logging_level=\"info\",\n", " ),\n", ")" @@ -849,9 +859,22 @@ ")\n", "print(dataset_zipfile_path)\n", "\n", - "temp_data_path = \"./imagenet-1000\"\n", + "# For CI stability, use a smaller subset to keep batch scoring duration bounded.\n", + "temp_data_path = \"./imagenet-100\"\n", + "max_images = 100\n", + "extracted = 0\n", "with ZipFile(dataset_zipfile_path, \"r\") as zip_ref:\n", - " zip_ref.extractall(temp_data_path)" + " for member in zip_ref.infolist():\n", + " if member.is_dir():\n", + " continue\n", + " if not member.filename.lower().endswith((\".jpeg\", \".jpg\", \".png\")):\n", + " continue\n", + " zip_ref.extract(member, temp_data_path)\n", + " extracted += 1\n", + " if extracted >= max_images:\n", + " break\n", + "\n", + "print(f\"Extracted {extracted} images to {temp_data_path}\")" ] }, { @@ -883,7 +906,7 @@ "imagenet_sample = Data(\n", " path=temp_data_path,\n", " type=AssetTypes.URI_FOLDER,\n", - " description=\"A sample of 1000 images from the original ImageNet dataset\",\n", + " description=\"A sample of 100 images from the original ImageNet dataset\",\n", " name=dataset_name,\n", ")" ] @@ -1296,9 +1319,13 @@ "%%writefile code/score-by-batch/batch_driver.py\n", "\n", "import os\n", + "# Required before importing tensorflow when model was saved with legacy tf.keras behavior.\n", + "os.environ.setdefault(\"TF_USE_LEGACY_KERAS\", \"1\")\n", + "\n", "import numpy as np\n", "import pandas as pd\n", "import tensorflow as tf\n", + "import tensorflow_hub as hub\n", "from tensorflow.keras.models import load_model\n", "\n", "\n", @@ -1310,8 +1337,8 @@ " # AZUREML_MODEL_DIR is an environment variable created during deployment\n", " model_path = os.path.join(os.environ[\"AZUREML_MODEL_DIR\"], \"model\")\n", "\n", - " # load the model\n", - " model = load_model(model_path)\n", + " # Load with TF Hub custom object registration for KerasLayer deserialization.\n", + " model = load_model(model_path, custom_objects={\"KerasLayer\": hub.KerasLayer})\n", " input_width = 244\n", " input_height = 244\n", "\n", @@ -1375,6 +1402,7 @@ " endpoint_name=endpoint.name,\n", " model=model,\n", " environment=environment,\n", + " environment_variables={\"TF_USE_LEGACY_KERAS\": \"1\"},\n", " code_configuration=CodeConfiguration(\n", " code=\"code/score-by-batch\",\n", " scoring_script=\"batch_driver.py\",\n", @@ -1386,7 +1414,7 @@ " mini_batch_size=10,\n", " output_action=BatchDeploymentOutputAction.APPEND_ROW,\n", " output_file_name=\"predictions.csv\",\n", - " retry_settings=BatchRetrySettings(max_retries=3, timeout=300),\n", + " retry_settings=BatchRetrySettings(max_retries=5, timeout=1800),\n", " logging_level=\"info\",\n", " ),\n", ")" diff --git a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-mlflow.ipynb b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-mlflow.ipynb index 7c764c58ec..08744b800f 100644 --- a/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-mlflow.ipynb +++ b/sdk/python/endpoints/batch/deploy-models/imagenet-classifier/imagenet-classifier-mlflow.ipynb @@ -174,8 +174,13 @@ }, "outputs": [], "source": [ - "import tensorflow_hub as hub\n", + "%pip install \"protobuf>=6.31.1,<8.0.0\" \"tensorflow-hub==0.16.1\" \"tf-keras==2.21.0\"\n", + "\n", + "import os\n", + "os.environ[\"TF_USE_LEGACY_KERAS\"] = \"1\"\n", + "\n", "import tensorflow as tf\n", + "import tensorflow_hub as hub\n", "\n", "model = tf.keras.Sequential(\n", " [\n", diff --git a/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-recipes-univariate/automl-forecasting-recipe-univariate-experiment-settings.ipynb b/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-recipes-univariate/automl-forecasting-recipe-univariate-experiment-settings.ipynb index 80cc9a938e..12f22bffe7 100644 --- a/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-recipes-univariate/automl-forecasting-recipe-univariate-experiment-settings.ipynb +++ b/sdk/python/jobs/automl-standalone-jobs/automl-forecasting-recipes-univariate/automl-forecasting-recipe-univariate-experiment-settings.ipynb @@ -2,67 +2,92 @@ "cells": [ { "cell_type": "markdown", - "source": [ - "Copyright (c) Microsoft Corporation. All rights reserved.\r\n", - "\r\n", - "Licensed under the MIT License." - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } + }, + "source": [ + "Copyright (c) Microsoft Corporation. All rights reserved.\n", + "\n", + "Licensed under the MIT License." + ] }, { "cell_type": "markdown", - "source": [ - "![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-recipes-univariate/1_determine_experiment_settings.png)" - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } + }, + "source": [ + "![Impressions](https://PixelServer20190423114238.azurewebsites.net/api/impressions/MachineLearningNotebooks/how-to-use-azureml/automated-machine-learning/forecasting-recipes-univariate/1_determine_experiment_settings.png)" + ] }, { "cell_type": "markdown", - "source": [ - "In this notebook we will explore the univariate time-series data to determine the settings for an automated ML experiment. We will follow the thought process depicted in the following diagram:
\r\n", - "![Forecasting after training](./figures/univariate_settings_map_20210408.jpg)\r\n", - "\r\n", - "The objective is to answer the following questions:\r\n", - "\r\n", - "
    \r\n", - "
  1. Is there a seasonal pattern in the data?
  2. \r\n", - " \r\n", - "
  3. Is the data stationary?
  4. \r\n", - " \r\n", - "
  5. Is there a detectable auto-regressive pattern in the stationary data?
  6. \r\n", - " \r\n", - "
\r\n", - "\r\n", - "The answers to these questions will help determine the appropriate settings for the automated ML experiment." - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } + }, + "source": [ + "In this notebook we will explore the univariate time-series data to determine the settings for an automated ML experiment. We will follow the thought process depicted in the following diagram:
\n", + "![Forecasting after training](./figures/univariate_settings_map_20210408.jpg)\n", + "\n", + "The objective is to answer the following questions:\n", + "\n", + "
    \n", + "
  1. Is there a seasonal pattern in the data?
  2. \n", + " \n", + "
  3. Is the data stationary?
  4. \n", + " \n", + "
  5. Is there a detectable auto-regressive pattern in the stationary data?
  6. \n", + " \n", + "
\n", + "\n", + "The answers to these questions will help determine the appropriate settings for the automated ML experiment." + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install --upgrade --force-reinstall --no-cache-dir arch" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "gather": { + "logged": 1670413639061 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, + "nteract": { + "transient": { + "deleting": false + } + } + }, + "outputs": [], "source": [ "import os\n", "import warnings\n", @@ -83,26 +108,26 @@ "# set printing options\n", "pd.set_option(\"display.max_columns\", 500)\n", "pd.set_option(\"display.width\", 1000)" - ], - "outputs": [], + ] + }, + { + "cell_type": "code", "execution_count": null, "metadata": { + "gather": { + "logged": 1670413639203 + }, "jupyter": { - "source_hidden": false, - "outputs_hidden": false + "outputs_hidden": false, + "source_hidden": false }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413639061 } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# load data\n", "TARGET_COLNAME = \"S4248SM144SCEN\"\n", @@ -113,45 +138,45 @@ "df.sort_values(by=TIME_COLNAME, inplace=True)\n", "df.set_index(TIME_COLNAME, inplace=True)\n", "df.head(2)" - ], - "outputs": [], + ] + }, + { + "cell_type": "code", "execution_count": null, "metadata": { "jupyter": { - "source_hidden": false, - "outputs_hidden": false + "outputs_hidden": false, + "source_hidden": false }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413639203 } - } + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] }, { "cell_type": "code", - "source": [ - "%matplotlib inline" - ], - "outputs": [], "execution_count": null, "metadata": { + "gather": { + "logged": 1670413639830 + }, "jupyter": { - "source_hidden": false, - "outputs_hidden": false + "outputs_hidden": false, + "source_hidden": false }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# plot the entire dataset\n", "plt.figure(figsize=(6, 2), dpi=180)\n", @@ -159,39 +184,39 @@ "plt.title(\"Original Data Series\")\n", "plt.xticks(rotation=45)\n", "plt.show()" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413639830 } - } - }, - { - "cell_type": "markdown", + }, "source": [ "The graph plots the alcohol sales in the United States. Because the data is trending, it can be difficult to see cycles, seasonality or other interesting behaviors due to the scaling issues. For example, if there is a seasonal pattern, which we will discuss later, we cannot see them on the trending data. In such case, it is worth plotting the same data in first differences." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640026 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# plot the entire dataset in first differences\n", "plt.figure(figsize=(6, 2), dpi=180)\n", @@ -199,58 +224,58 @@ "plt.title(\"Data in first differences\")\n", "plt.xticks(rotation=45)\n", "plt.show()" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413640026 } - } + }, + "source": [ + "In the previous plot we observe that the data is more volatile towards the end of the series. This period coincides with the Covid-19 period, so we will exclude it from our experiment. Since in this example there are no user-provided features it is hard to make an argument that a model trained on the less volatile pre-covid data will be able to accurately predict the covid period." + ] }, { "cell_type": "markdown", - "source": [ - "In the previous plot we observe that the data is more volatile towards the end of the series. This period coincides with the Covid-19 period, so we will exclude it from our experiment. Since in this example there are no user-provided features it is hard to make an argument that a model trained on the less volatile pre-covid data will be able to accurately predict the covid period." - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "markdown", + }, "source": [ - "# 1. Seasonality\r\n", - "\r\n", - "#### Questions that need to be answered in this section:\r\n", - "1. Is there a seasonality?\r\n", - "2. If it's seasonal, does the data exhibit a trend (up or down)?\r\n", - "\r\n", + "# 1. Seasonality\n", + "\n", + "#### Questions that need to be answered in this section:\n", + "1. Is there a seasonality?\n", + "2. If it's seasonal, does the data exhibit a trend (up or down)?\n", + "\n", "It is hard to visually detect seasonality when the data is trending. The reason being is scale of seasonal fluctuations is dwarfed by the range of the trend in the data. One way to deal with this is to de-trend the data by taking the first differences. We will discuss this in more detail in the next section." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640292 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# plot the entire dataset in first differences\n", "plt.figure(figsize=(6, 2), dpi=180)\n", @@ -258,39 +283,39 @@ "plt.title(\"Data in first differences\")\n", "plt.xticks(rotation=45)\n", "plt.show()" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413640292 } - } - }, - { - "cell_type": "markdown", + }, "source": [ "For the next plot, we will exclude the Covid period again. We will also shorten the length of data because plotting a very long time series may prevent us from seeing seasonal patterns, if there are any, because the plot may look like a random walk." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640486 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# remove COVID period\n", "df = df[:COVID_PERIOD_START]\n", @@ -301,93 +326,93 @@ "plt.title(\"Data in first differences\")\n", "plt.xticks(rotation=45)\n", "plt.show()" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413640486 } - } + }, + "source": [ + "

Conclusion

\n", + "\n", + "Visual examination does not suggest clear seasonal patterns. We will set the STL_TYPE = None, and we will move to the next section that examines stationarity. \n", + "\n", + "\n", + "Say, we are working with a different data set that shows clear patterns of seasonality, we have several options for setting the settings:is hard to say which option will work best in your case, hence you will need to run both options to see which one results in more accurate forecasts. \n", + "
    \n", + "
  1. If the data does not appear to be trending, set DIFFERENCE_SERIES=False, TARGET_LAGS=None and STL_TYPE = \"season\"
  2. \n", + "
  3. If the data appears to be trending, consider one of the following two settings:\n", + " \n", + "
" + ] }, { "cell_type": "markdown", - "source": [ - "

Conclusion

\r\n", - "\r\n", - "Visual examination does not suggest clear seasonal patterns. We will set the STL_TYPE = None, and we will move to the next section that examines stationarity. \r\n", - "\r\n", - "\r\n", - "Say, we are working with a different data set that shows clear patterns of seasonality, we have several options for setting the settings:is hard to say which option will work best in your case, hence you will need to run both options to see which one results in more accurate forecasts. \r\n", - "
    \r\n", - "
  1. If the data does not appear to be trending, set DIFFERENCE_SERIES=False, TARGET_LAGS=None and STL_TYPE = \"season\"
  2. \r\n", - "
  3. If the data appears to be trending, consider one of the following two settings:\r\n", - " \r\n", - "
" - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "markdown", + }, "source": [ - "# 2. Stationarity\r\n", - "If the data does not exhibit seasonal patterns, we would like to see if the data is non-stationary. Particularly, we want to see if there is a clear trending behavior. If such behavior is observed, we would like to first difference the data and examine the plot of an auto-correlation function (ACF) known as correlogram. If the data is seasonal, differencing it will not get rid off the seasonality and this will be shown on the correlogram as well.\r\n", - "\r\n", - "\r\n", - "\r\n", - "\r\n", - "\r\n", - "\r\n", - "#### Questions that need to be answered in this section:\r\n", - "
    \r\n", - "
  1. Is the data stationary?
  2. \r\n", - "
  3. Does the stationarized data (either the original or the differenced series) exhibit a clear auto-regressive pattern?
  4. \r\n", - "
\r\n", - "\r\n", + "# 2. Stationarity\n", + "If the data does not exhibit seasonal patterns, we would like to see if the data is non-stationary. Particularly, we want to see if there is a clear trending behavior. If such behavior is observed, we would like to first difference the data and examine the plot of an auto-correlation function (ACF) known as correlogram. If the data is seasonal, differencing it will not get rid off the seasonality and this will be shown on the correlogram as well.\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "#### Questions that need to be answered in this section:\n", + "
    \n", + "
  1. Is the data stationary?
  2. \n", + "
  3. Does the stationarized data (either the original or the differenced series) exhibit a clear auto-regressive pattern?
  4. \n", + "
\n", + "\n", "To answer the first question, we run a series of tests (we call them unit root tests)." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640585 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# unit root tests\n", "test = unit_root_test_wrapper(df[TARGET_COLNAME])\n", @@ -395,58 +420,58 @@ "print(\"Summary table\", \"\\n\", test[\"summary\"], \"\\n\")\n", "print(\"Is the {} series stationary?: {}\".format(TARGET_COLNAME, test[\"stationary\"]))\n", "print(\"---------------\", \"\\n\")" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413640585 } - } - }, - { - "cell_type": "markdown", + }, "source": [ - "In the previous cell, we ran a series of unit root tests. The summary table contains the following columns:\r\n", - "\r\n", - "\r\n", - "Each of the tests shows that the original time series is non-stationary. The final decision is based on the majority rule. If, there is a split decision, the algorithm will claim it is stationary. We run a series of tests because each test by itself may not be accurate. In many cases when there are conflicting test results, the user needs to make determination if the series is stationary or not.\r\n", - "\r\n", + "In the previous cell, we ran a series of unit root tests. The summary table contains the following columns:\n", + "\n", + "\n", + "Each of the tests shows that the original time series is non-stationary. The final decision is based on the majority rule. If, there is a split decision, the algorithm will claim it is stationary. We run a series of tests because each test by itself may not be accurate. In many cases when there are conflicting test results, the user needs to make determination if the series is stationary or not.\n", + "\n", "Since we found the series to be non-stationary, we will difference it and then test if the differenced series is stationary." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640690 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# unit root tests\n", "test = unit_root_test_wrapper(df[TARGET_COLNAME].diff().dropna())\n", @@ -454,39 +479,39 @@ "print(\"Summary table\", \"\\n\", test[\"summary\"], \"\\n\")\n", "print(\"Is the {} series stationary?: {}\".format(TARGET_COLNAME, test[\"stationary\"]))\n", "print(\"---------------\", \"\\n\")" - ], - "outputs": [], - "execution_count": null, + ] + }, + { + "cell_type": "markdown", "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, "nteract": { "transient": { "deleting": false } - }, - "gather": { - "logged": 1670413640690 } - } - }, - { - "cell_type": "markdown", + }, "source": [ "Four out of five tests show that the series in first differences is stationary. Notice that this decision is not unanimous. Next, let's plot the original series in first-differences to illustrate the difference between non-stationary (unit root) process vs the stationary one." - ], + ] + }, + { + "cell_type": "code", + "execution_count": null, "metadata": { + "gather": { + "logged": 1670413640827 + }, + "jupyter": { + "outputs_hidden": false, + "source_hidden": false + }, "nteract": { "transient": { "deleting": false } } - } - }, - { - "cell_type": "code", + }, + "outputs": [], "source": [ "# plot original and stationary data\n", "fig = plt.figure(figsize=(10, 10))\n", @@ -496,277 +521,258 @@ "ax2.plot(df[TARGET_COLNAME].diff().dropna(), \"-b\")\n", "ax1.title.set_text(\"Original data\")\n", "ax2.title.set_text(\"Data in first differences\")" - ], - "outputs": [], - "execution_count": null, - "metadata": { - "jupyter": { - "source_hidden": false, - "outputs_hidden": false - }, - "nteract": { - "transient": { - "deleting": false - } - }, - "gather": { - "logged": 1670413640827 - } - } + ] }, { "cell_type": "markdown", - "source": [ - "If you were asked a question \"What is the mean of the series before and after 2008?\", for the series titled \"Original data\" the mean values will be significantly different. This implies that the first moment of the series (in this case, it is the mean) is time dependent, i.e., mean changes depending on the interval one is looking at. Thus, the series is deemed to be non-stationary. On the other hand, for the series titled \"Data in first differences\" the means for both periods are roughly the same. Hence, the first moment is time invariant; meaning it does not depend on the interval of time one is looking at. In this example it is easy to visually distinguish between stationary and non-stationary data. Often this distinction is not easy to make, therefore we rely on the statistical tests described above to help us make an informed decision. " - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } + }, + "source": [ + "If you were asked a question \"What is the mean of the series before and after 2008?\", for the series titled \"Original data\" the mean values will be significantly different. This implies that the first moment of the series (in this case, it is the mean) is time dependent, i.e., mean changes depending on the interval one is looking at. Thus, the series is deemed to be non-stationary. On the other hand, for the series titled \"Data in first differences\" the means for both periods are roughly the same. Hence, the first moment is time invariant; meaning it does not depend on the interval of time one is looking at. In this example it is easy to visually distinguish between stationary and non-stationary data. Often this distinction is not easy to make, therefore we rely on the statistical tests described above to help us make an informed decision. " + ] }, { "cell_type": "markdown", - "source": [ - "

Conclusion

\r\n", - "Since we found the original process to be non-stationary (contains unit root), we will have to model the data in first differences. As a result, we will set the DIFFERENCE_SERIES parameter to True." - ], "metadata": { "nteract": { "transient": { "deleting": false } } - } + }, + "source": [ + "

Conclusion

\n", + "Since we found the original process to be non-stationary (contains unit root), we will have to model the data in first differences. As a result, we will set the DIFFERENCE_SERIES parameter to True." + ] }, { "cell_type": "markdown", - "source": [ - "# 3 Check if there is a clear autoregressive pattern\r\n", - "We need to determine if we should include lags of the target variable as features in order to improve forecast accuracy. To do this, we will examine the ACF and partial ACF (PACF) plots of the stationary series. In our case, it is a series in first differences.\r\n", - "\r\n", - "