Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug in tensorflow tests due to long paths for working folders #4816

Merged
merged 1 commit into from Feb 10, 2020

Conversation

@harishsk
Copy link
Member

harishsk commented Feb 8, 2020

TF tests are relying on IClassFixture to carry forward state from test to test. This by default creates excessively long paths that result in file system errors when there is a longer prefix for the source code. I have fixed it to take temp paths with shorter path lengths.

@harishsk harishsk requested a review from dotnet/mlnet-core as a code owner Feb 8, 2020
@harishsk harishsk requested review from harshithapv, ganik and antoniovs1029 Feb 8, 2020
string assetsRelativePath = @"assets";
assetsPath = GetAbsolutePath(assetsRelativePath);
string workspacePath = Path.Combine(assetsPath, "cached");
tempFolder = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());

This comment has been minimized.

Copy link
@yaeldekel

yaeldekel Feb 10, 2020

Member

Path.GetTempPath(), Path.GetRandomFileName() [](start = 38, length = 44)

Are these guaranteed to be shorter? #Resolved

This comment has been minimized.

Copy link
@harishsk

harishsk Feb 10, 2020

Author Member

Yes, these are guaranteed to be shorter. Path.GetRandomeFile() only produces a 12 character random filename and in combination with Path.GetTempPath() (which is typically %USERPROFILE%\AppData\Local\Temp) the overall path will be significantly shorter than what what produced earlier.


In reply to: 376950593 [](ancestors = 376950593)

Copy link
Member

frank-dong-ms left a comment

:shipit:

@harishsk harishsk merged commit c9d950e into dotnet:master Feb 10, 2020
17 checks passed
17 checks passed
MachineLearning-CI Build #20200207.30 succeeded
Details
MachineLearning-CI (Centos_x64_NetCoreApp30 Debug_Build) Centos_x64_NetCoreApp30 Debug_Build succeeded
Details
MachineLearning-CI (Centos_x64_NetCoreApp30 Release_Build) Centos_x64_NetCoreApp30 Release_Build succeeded
Details
MachineLearning-CI (MacOS_x64_NetCoreApp21 Debug_Build) MacOS_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (MacOS_x64_NetCoreApp21 Release_Build) MacOS_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Ubuntu_x64_NetCoreApp21 Debug_Build) Ubuntu_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Ubuntu_x64_NetCoreApp21 Release_Build) Ubuntu_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp21 Debug_Build) Windows_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp21 Release_Build) Windows_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp30 Debug_Build) Windows_x64_NetCoreApp30 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp30 Release_Build) Windows_x64_NetCoreApp30 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetFx461 Debug_Build) Windows_x64_NetFx461 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetFx461 Release_Build) Windows_x64_NetFx461 Release_Build succeeded
Details
MachineLearning-CI (Windows_x86_NetCoreApp21 Debug_Build) Windows_x86_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x86_NetCoreApp21 Release_Build) Windows_x86_NetCoreApp21 Release_Build succeeded
Details
WIP Ready for review
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.