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

Integrating ML.Net 3.0.1 into Unity 2022.3.28f1 causes "DllNotFoundExeption: CpuMathNative" #7226

Open
Tatyana-Stoyanova opened this issue Aug 29, 2024 · 0 comments
Labels
untriaged New issue has not been triaged

Comments

@Tatyana-Stoyanova
Copy link

Tatyana-Stoyanova commented Aug 29, 2024

System Information (please complete the following information):

  • Windows 10
  • ML.NET Version: 3.0.1
  • Api Compatibility Level - .Net FrameWork
  • VS 2022 17.11.2
  • NuGet for Unity 4.1.1

Describe the bug
Trying to fit the model causes DllNotFoundException: CpuMathNative error in the console.

To Reproduce
Steps to reproduce the behavior:

  1. Install Microsoft.ML(3.0.1) and System.Runtime.CompilerServices.Unsafe(6.0.0) using NuGet for Unity. (other dependencies are automatically installed - such as Microsoft.ML.CpuMath.3.0.1, Microsoft.ML.DataView.3.0.1, System.Memory.4.5.5, System.Numerics.Tensors.8.0.0)
  2. Create TextLoader to read data from csv file, make a pipeline to preprocess data and fit the model
  3. See error

Expected behavior
The fiting must create a model that is ready to be used for evaluetion and prediction.

Actual behaviour
(In Editor)
"DllNotFoundExceptionL CpuMathNative ... "

Screenshots, Code, Sample Projects
image
Dlls import settings
image

Additional context
The bug is duplicate of #6741. The proposed solution #6741 (comment) by @luisquintanilla does not fix the issue, because in the Microsoft.ML.CpuMath package that was importet as Nuget there was no CPUMathNative.dll, only Microsoft.ML.CPUMath.dll.
Actually the problem was solved with copying of the missing dll from the Minimal ML Test example posted on following issue: MLContext.Data.LoadFromEnumerable() not working in Unity for netstandard2.0 api, but the CpuMathNative.dll is actually missing in the last version of Microsoft.ML.CpuMath.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant