[release/4.0] Improve unique directory generation for temp files#7528
Merged
ericstj merged 3 commits intorelease/4.0from Oct 24, 2025
Merged
[release/4.0] Improve unique directory generation for temp files#7528ericstj merged 3 commits intorelease/4.0from
ericstj merged 3 commits intorelease/4.0from
Conversation
Refactor unique directory creation logic to use random file names.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
Need to fix the build, will first do that here -- darc-release/4.0-59b01119-72fa-4ec9-8595-f64b50c7a93e - #7470 |
tarekgh
approved these changes
Oct 22, 2025
Member
tarekgh
left a comment
There was a problem hiding this comment.
LGTM. The build issue is not directly related to the change. Eric is fixing that.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/4.0 #7528 +/- ##
============================================
Coverage 68.89% 68.89%
============================================
Files 1470 1470
Lines 274081 274082 +1
Branches 28405 28405
============================================
+ Hits 188836 188840 +4
Misses 77928 77928
+ Partials 7317 7314 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Member
|
/azp run MachineLearning-CI |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Oct 28, 2025
This was referenced Nov 19, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Backport of #7520 to release/4.0
/cc @ericstj
Customer Impact
For each model opened ML.NET would leave behind a temp folder which would slowly accumulate in the temp directory. It also had an algorithm for temp folder creation which would linearly degrade with each new folder.
Testing
Tested fix that the folder is deleted and the creation algorithm does not degrade linearly if folders happen to be left behind because it uses GetTempFileName to produce significantly random folder name candidates.
Risk
This fix doesn't clean up past folders, we should release-note that users may want to do this manually.