Added working version of checking whether file is available for access #4938
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.
Recently AutoFitRegressionTest() and AutoFitBinaryTest() have been failing occasionally on our MachineLearning-Full CI builds with the error:
(Specific errors for AutoFitRegressionTest and AutoFitBinaryTest from CI builds)
This indicates that the .dataset file that is trying to be reached still has a lock on it, and is not yet ready for accessing. The current method of checking whether this file is ready to be accessed (checking
new FileInfo(dataFile).Length > 0
is not sufficient.The fix below remedies this by obtaining these dataset files from the local
test/data
path, and thereby eliminating the possibility of download locks. This fix also does the same for other datasets that are available locally that were being downloaded from a commit before, so that similar file lock issues for those datasets can be avoided as well.