migrate AutoML forecasting model loading to skops - #5250
Open
HarshaVardhanBabu (babu-namburi) wants to merge 12 commits into
Open
migrate AutoML forecasting model loading to skops#5250HarshaVardhanBabu (babu-namburi) wants to merge 12 commits into
HarshaVardhanBabu (babu-namburi) wants to merge 12 commits into
Conversation
Add a validated skops 0.14 compatibility override for the AutoML NumPy stack and replace pickle loading with trusted skops and weights-only PyTorch loading. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
July 30, 2026 16:54 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
July 30, 2026 16:55 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
July 30, 2026 16:55 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
marked this pull request as ready for review
August 10, 2026 04:44
Fail closed on unsafe or ambiguous artifacts, retain legacy coexistence for older consumers, and validate the pinned skops environment path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the automl-gpu Dockerfile conflict by retaining the latest image vulnerability updates and the safe skops compatibility installation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 10, 2026 05:13 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 10, 2026 05:13 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 10, 2026 05:14 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 15, 2026 17:11 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
had a problem deploying
to
Testing
August 15, 2026 17:11 — with
GitHub Actions
Failure
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 15, 2026 17:11 — with
GitHub Actions
Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 485f9b8c-40a7-4b88-8c20-e79042f96e16
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 17, 2026 17:12 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
had a problem deploying
to
Testing
August 17, 2026 17:12 — with
GitHub Actions
Failure
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 17, 2026 17:12 — with
GitHub Actions
Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 485f9b8c-40a7-4b88-8c20-e79042f96e16
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 17, 2026 17:25 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 17, 2026 17:25 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
had a problem deploying
to
Testing
August 17, 2026 17:25 — with
GitHub Actions
Failure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 485f9b8c-40a7-4b88-8c20-e79042f96e16
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 18, 2026 02:08 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
had a problem deploying
to
Testing
August 18, 2026 02:09 — with
GitHub Actions
Failure
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 18, 2026 02:09 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 05:33 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 05:33 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
had a problem deploying
to
Testing
August 25, 2026 05:33 — with
GitHub Actions
Failure
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ea2cc5d-cff6-46d5-80cb-7da059c76a2b
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 07:05 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 07:05 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 07:05 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 07:06 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 09:02 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 09:03 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 09:03 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
HarshaVardhanBabu (babu-namburi)
August 25, 2026 09:07
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Hardens AutoML forecasting inference by replacing pickle/PyTorch deserialization with fail-closed skops loading and updating the supporting GPU environment.
Changes:
- Adds secure
.skopsdiscovery and loading. - Installs and validates skops against the existing NumPy stack.
- Updates component metadata and loader tests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
environments/automl-gpu/environment.yaml |
Includes the compatibility test in the build context. |
environments/automl-gpu/context/skops_compatibility_test.py |
Smoke-tests skops serialization compatibility. |
environments/automl-gpu/context/Dockerfile |
Installs skops and enables safe forecasting export. |
environments/automl-gpu/context/conda_dependencies.yaml |
Adds the PrettyTable dependency. |
automl-single-model-inference/tests/test_model_loader.py |
Tests safe model discovery and loading. |
automl-single-model-inference/src/model_loader.py |
Implements fail-closed skops loading. |
automl-single-model-inference/src/inference.py |
Delegates model handling to the secure loader. |
automl-single-model-inference/components/inference/spec.yaml |
Versions and documents the hardened component. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+63
to
+64
| untrusted_types = skops_io.get_untrusted_types(file=model_full_path) | ||
| if untrusted_types: |
Comment on lines
+125
to
+131
| def test_find_model_rejects_non_directory_path(tmp_path): | ||
| """Reject a file passed where a model directory is required.""" | ||
| model_path = tmp_path / "model.skops" | ||
| model_path.write_bytes(b"skops") | ||
|
|
||
| with pytest.raises(ValueError, match="regular directory"): | ||
| model_loader.find_model(str(model_path)) |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ea2cc5d-cff6-46d5-80cb-7da059c76a2b
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 11:38 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 11:38 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 25, 2026 11:38 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 26, 2026 05:39 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 26, 2026 05:39 — with
GitHub Actions
Inactive
HarshaVardhanBabu (babu-namburi)
temporarily deployed
to
Testing
August 26, 2026 05:39 — with
GitHub Actions
Inactive
|
This pull request has been marked as stale because it has been inactive for 14 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Ready for team review.
The producer-side integration is available in AzureMlCli PR 2234915. It directly serializes fitted forecasting models to
outputs/mlflow-model/model.skopswhile retaining existing pickle/PyTorch artifacts for older consumers.Summary
.skopsloading.skopsartifact to coexist with legacy artifacts for cross-version compatibilityskops==0.14.0against the existing NumPy 1.23.5 AutoML stackmainBackward compatibility
AUTOML_ENABLE_SAFE_FORECASTING_MODEL_EXPORT=true.skopsand unchanged legacy artifacts.skopsand intentionally rejects legacy-only pickle/PyTorch modelsExisting models must be retrained or re-exported before using this component version.
Security improvements
.skopsartifacts fail closedDependency resolution
The current AutoML runtime requires NumPy
<=1.23.5, while skops 0.14 declares NumPy>=1.25. The environment installsskops==0.14.0with--no-depsand runs a build-time compatibility test without changing the supported AutoML NumPy stack. This override remains outside skops' declared support matrix and should be removed when AzureML supports NumPy 1.25 or later.Validation
mainRemaining merge requirements
ForecastingPipelineWrapperBroad
azureml.*trust and artifact-supplied trust lists are explicitly out of scope because they would weaken the deserialization boundary.