dotnet / dotnet/machinelearning

Microsoft.ML.TimeSeries: Unable to load shared library 'MklImports' or one of its dependencies.

Open
#5,788 12 comments 0 reactions 0 assignees View on GitHub
area-Native Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

### System information
**OS:** MacOS Big Sur
**OS Version:** 11.3.1
**.Net Version:** 5.0.202
**.Net Framework:** .Net Core 3.1
**Packages/Versions:**
Microsoft.ML 1.5.5
Microsoft.ML.TimeSeries 1.5.5
Microsoft.ML.Mkl.Redist 1.5.5

### Issue
Executing the following method throws an exception as denoted below.
SsaForecastingTransformer.Fit(IDataView input) throws exception Microsoft.ML.TimeSeries: Unable to load shared library 'MklImports' or one of its dependencies.

### Source Code
I can produce this error using the example code as found in the method documentation at [microsoft.ml.timeseriescatalog.forecastbyssa](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.timeseriescatalog.forecastbyssa?view=ml-dotnet) or in even simpler configurations.

### Self Help Troubleshooting

1. **Installed Extra ML.ET Dependencies as instructed @ [Install extra ML.NET dependencies - ML.NET | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/machine-learning/how-to-guides/install-extra-dependencies)**

The following fails on this version of MacOS. However, upon further inspection of the HomeBrew script the bottle SHA signatures were failing to validate. Correcting these seems to have allowed the script to install.

`wget https://raw.githubusercontent.com/Homebrew/homebrew-core/fb8323f2b170bd4ae97e1bac9bf3e2983af3fdb0/Formula/libomp.rb && brew install ./libomp.rb && brew link libomp --force`

2. **Enabled DYLD_PRINT_LIBRARIES**
After enabling this environment variable it appears that dotnet --version command will list all the linked libraries as exampled below. However, the libomp library cannot be found in this list.

Example Output of dotnet --version where libomp isn't found.
dyld: loaded: <23377312-A7DE-3C6C-BCCD-CC68DA1B1898> /usr/local/share/dotnet/dotnet
dyld: loaded: /usr/lib/libc++.1.dylib
dyld: loaded: /usr/lib/libSystem.B.dylib
dyld: loaded: <22AFC7FC-2DB6-3EF0-9CC0-EFFB9B65D5E2> /usr/lib/libc++abi.dylib
...
...
...

### Related Issue
[Unable to load shared library 'MklImports' or one of its dependencies. · Issue #3903 · dotnet/machinelearning · GitHub](https://github.com/dotnet/machinelearning/issues/3903)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.