Skip to content

Fix Unix path handling in result-processor tests - #7727

Merged
rosebyte merged 3 commits into
dotnet:mainfrom
rosebyte:rosebyte-issue-completion-status
Oct 21, 2026
Merged

rosebyte merged 3 commits into
dotnet:mainfrom
rosebyte:rosebyte-issue-completion-status

Conversation

@rosebyte

@rosebyte rosebyte commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Fixes #26

Fixes Unix path handling in result-processor tests and re-enables -rp.txt generation and baseline comparison on Linux and macOS. Absolute Unix input paths were interpreted as command-line options, preventing result-summary generation. A Windows-only guard had been masking this problem by skipping the affected checks.

Changes

  • Pass input and output paths through the supported in= and o= arguments, using CmdQuoter to escape them correctly.
  • Check the result processor’s exit code and remove the Windows-only guard.
  • Add four regression cases covering multiple absolute input paths, spaces, and balanced and unmatched braces.
  • Add twelve missing macOS ARM64 result-summary baselines, including the two SymSGD summaries exposed by CI.
  • Update thirteen stale Linux ARM and ARM64 result-summary baselines and add the missing Linux ARM baseline for non-negative multiclass logistic regression.

Baseline changes

While result-summary checks were disabled on Unix, some -rp.txt baselines fell out of sync with their corresponding platform-specific training-output (-out.txt) baselines.
The corrected summaries match the existing training-output baselines. These changes repair stale or missing expectations, rather than alter training behaviour. Production code, shared baselines and comparison tolerances are unchanged.

Copilot AI lite review requested due to automatic review settings September 21, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It changes cross-platform baseline verification behavior for many predictor tests and explicitly notes Windows/Linux validation is still pending.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

This PR fixes cross-platform invocation of the internal ResultProcessor used by predictor baseline tests by ensuring absolute Unix paths are passed as values (not mis-parsed as /option switches), and by re-enabling -rp.txt generation/verification on non-Windows platforms.

Changes:

  • Update the ResultProcessor test helper to pass inputs/outputs using in= and o= with CmdQuoter, and fail the test when ResultProcessor returns a non-zero exit code.
  • Remove the Windows-only guard so -rp.txt baselines are generated and compared on Linux/macOS as well.
  • Add regression coverage for absolute paths (including spaces and braces) and add missing macOS arm64 -rp.txt baselines.
File Description
test/​Microsoft.ML.TestFramework/​BaseTestPredictorsMaml.cs Fixes ResultProcessor argument construction/quoting and enables -rp.txt checks cross-platform.
test/​Microsoft.ML.Predictor.Tests/​ResultProcessor/​TestResultProcessor.cs Adds regression test covering absolute input paths with spaces/braces.
test/​BaselineOutput/​Common/​WeightedEnsembleMulticlass/​osx-arm64/​WE-Bootstrap-TrainTest-iris-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​WeightedEnsembleMulticlass/​osx-arm64/​WE-Average-TrainTest-iris-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​WeightedEnsemble/​osx-arm64/​WE-Hetero-TrainTest-breast-cancer-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​WeightedEnsemble/​osx-arm64/​WE-AvgPer-TrainTest-breast-cancer-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​LdSvm/​osx-arm64/​LDSVM-nob-TrainTest-breast-cancer-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​LdSvm/​osx-arm64/​LDSVM-nob-CV-breast-cancer-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​LdSvm/​osx-arm64/​LDSVM-def-CV-breast-cancer-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​AveragedPerceptron/​osx-arm64/​AveragedPerceptron-TrainTest-breast-cancer.PAVcalibration-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​AveragedPerceptron/​osx-arm64/​AveragedPerceptron-TrainTest-breast-cancer.nocalibration-rp.txt Adds missing osx-arm64 result-processor baseline.
test/​BaselineOutput/​Common/​AveragedPerceptron/​osx-arm64/​AveragedPerceptron-TrainTest-breast-cancer.calibrateRandom-rp.txt Adds missing osx-arm64 result-processor baseline.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.77%. Comparing base (29f19e5) to head (938be9a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...crosoft.ML.TestFramework/BaseTestPredictorsMaml.cs 87.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7727   +/-   ##
=======================================
  Coverage   70.77%   70.77%           
=======================================
  Files        1420     1420           
  Lines      279877   279900   +23     
  Branches    27604    27605    +1     
=======================================
+ Hits       198077   198111   +34     
+ Misses      73620    73612    -8     
+ Partials     8180     8177    -3     
Flag Coverage Δ
Debug 70.77% <94.59%> (+<0.01%) ⬆️
production 64.21% <ø> (+<0.01%) ⬆️
test 90.76% <94.59%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ictor.Tests/ResultProcessor/TestResultProcessor.cs 25.26% <100.00%> (+25.26%) ⬆️
...crosoft.ML.TestFramework/BaseTestPredictorsMaml.cs 80.60% <87.50%> (+0.53%) ⬆️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matouskozak

Copy link
Copy Markdown
Member

Since this is handling UNIX (so both mac and linux), shouldn't we update the arm64 and arm linux baselines also?

@matouskozak matouskozak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I think the PR description is stale, so it would be worth updating it before merging.

@rosebyte
rosebyte merged commit ead44cd into dotnet:main Oct 21, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-rp.txt files are not getting generated on linux and mac

3 participants