-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix some issues for samples repo #870
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
Conversation
frank-dong-ms-zz
commented
Dec 11, 2020
- upgrade SciSharp.TensorFlow.Redist version to 2.3.1 same as ml.net
- fix tf not running on netcore 2.1 exception by introducing reference to "System.Runtime.CompilerServices.Unsafe" package
…netcore 2.1 exception
|
Merge this PR until we upgrade the ML.NET to 1.5.3 used in samples repro as Antonio pointed out. |
| <PackageReference Include="Microsoft.ML.TensorFlow" Version="$(MicrosoftMLVersion)" /> | ||
| <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.3.0" /> | ||
| <PackageReference Include="SciSharp.TensorFlow.Redist" Version="2.3.1" /> | ||
| <PackageReference Condition="'$(TargetFramework)'=='netcoreapp2.1'" Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.3" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of odd. Can you explain what the problem is here? In general, this smells like a packaging issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when we try to run TF related samples in netcore 2.1 in recent build (with upgrade to use tensorflow 2 from this PR: dotnet/machinelearning#5404) we will see below exception so I added the missing reference and that fix the exception:
System.IO.FileLoadException: "Could not load file or assembly "System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or one of it's dependences
One interesting thing is this exception only happens on netcore2.1 but not netcore 3.1.
In reply to: 540966485 [](ancestors = 540966485)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is package "SciSharp.TensorFlow.Redist" take dependency on "System.Runtime.CompilerServices.Unsafe" with version 4.5.3 and package "System.Runtime.CompilerServices.Unsafe" is not loaded by default on netcore2.1? We will really appreciate if you can help us understand the root cause of this issue.
In reply to: 541388519 [](ancestors = 541388519,540966485)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you send me an app that reproduces the failure? I would need to debug it to figure out the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Eric, use below ml.net sample with netcore2.1 and take "1.5.3-preview.20611.3" version of ml.net as dependency you should see the error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logged dotnet/runtime#46082 for this problem.
* upgrade SciSharp.TensorFlow.Redist version and fix tf not working on netcore 2.1 exception * update ml.net version