Use direct URLs for test resources#7663
Open
ericstj wants to merge 2 commits into
Open
Conversation
Temporarily bypass deleted aka.ms aliases for test datasets and centralize resilient direct downloads in the shared test framework. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57cca22a-bb40-4b25-b169-1c9e46ae88e1
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates ML.NET test infrastructure to bypass broken/deleted aka.ms/mlnet-resources aliases by switching tests/benchmarks to direct public URLs, and centralizes downloading logic into a shared helper to improve reliability.
Changes:
- Added
TestDownloadUtilsto perform bounded, retrying downloads via a temp-file + atomic move pattern. - Updated TensorFlow and AutoML test datasets to download from direct
mlpublicassetsblob URLs. - Updated performance benchmarks to fetch datasets from either raw GitHub (repo
test/data) ormlpublicassetsbenchmark blobs.
Show a summary per file
| File | Description |
|---|---|
| test/Microsoft.ML.TestFrameworkCommon/TestDownloadUtils.cs | New shared download helper with retry + temp-file move semantics. |
| test/Microsoft.ML.TestFrameworkCommon/Microsoft.ML.TestFrameworkCommon.csproj | Enables nullable annotations and links in RetryHelper for retries. |
| test/Microsoft.ML.TensorFlow.Tests/TensorflowTests.cs | Replaces ResourceManagerUtils downloads with direct blob URLs + TestDownloadUtils. |
| test/Microsoft.ML.PerformanceTests/ImageClassificationBench.cs | Switches dataset URL from aka.ms to direct blob URL. |
| test/Microsoft.ML.PerformanceTests/BenchmarkBase.cs | Replaces resource manager downloads with direct URL downloads via TestDownloadUtils. |
| test/Microsoft.ML.AutoML.Tests/DatasetUtil.cs | Switches dataset URL from aka.ms to direct blob URL. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 2
Validate response content length and remove the unused benchmark path local. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 57cca22a-bb40-4b25-b169-1c9e46ae88e1
ericstj
enabled auto-merge (squash)
July 16, 2026 21:11
auto-merge was automatically disabled
July 17, 2026 02:03
Pull request was closed
matouskozak
approved these changes
Jul 17, 2026
matouskozak
left a comment
Member
There was a problem hiding this comment.
Thanks a lot for fixing this
| string url; | ||
| if (path == "") | ||
| { | ||
| url = $"https://raw.githubusercontent.com/dotnet/machinelearning/main/test/data/{name.Replace('\\', '/')}"; |
Member
There was a problem hiding this comment.
Looking forward, do you think we might need to handle servicing release branches or is that not a concern in ML.NET? Just wondering if by taking data from main branch we might hit an issue later. Note, I haven't onboarded into the full release process so maybe this is not an issue at all.
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.
Summary
aka.ms/mlnet-resourcesaliases in testsTestDownloadUtilsFixes #7662
Validation
TensorFlowGettingSchemaMultipleTimesandAutoFeaturizer_image_teston net8.0