Repository navigation
Fix Unix path handling in result-processor tests - #7727
Conversation
There was a problem hiding this comment.
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
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=ando=withCmdQuoter, and fail the test when ResultProcessor returns a non-zero exit code. - Remove the Windows-only guard so
-rp.txtbaselines 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.txtbaselines.
| 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 Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Since this is handling UNIX (so both mac and linux), shouldn't we update the arm64 and arm linux baselines also? |
matouskozak
left a comment
There was a problem hiding this comment.
LGTM!
I think the PR description is stale, so it would be worth updating it before merging.

Fixes #26
Fixes Unix path handling in result-processor tests and re-enables
-rp.txtgeneration 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
in=ando=arguments, usingCmdQuoterto escape them correctly.Baseline changes
While result-summary checks were disabled on Unix, some
-rp.txtbaselines 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.