Someone treated already a similar issue ?
# mlforecast
r
Someone treated already a similar issue ?
j
Hey. How did you install the package (pip, conda)? Also, can you provide the code that you're running? We test multithreading for macos arm64 here. The cases where I've seen this segfault is when you have scikit-learn/numpy/scipy from conda and install mlforecast from pip
r
Sorry for my late reply. Every single package and dependencies managed by pip on isolated pyenv environment
The segmentation error was occurring during the mlforecast preprocess call
I’m not the call of model.fit
j
Hmm, it's hard to diagnose. It's most likely due to conflicting openmp versions being loaded. If you don't have many series it won't make much of a difference, so setting num_threads=1 should be fine. If you do want to use multithreading you can try installing from github (
pip install git+<https://github.com/nixtla/coreforecast|https://github.com/nixtla/coreforecast>
), which will compile the library locally and link the correct openmp lib, note that this requires a c++ compiler and ninja.
r
Awesome !!! i will test the solution today and i will reply back. Thanks for your help
Sorry, it's will be a very stupid question. you recommand manually compile c++ routines of coreforecast ?
i don't understand how coreforecast compiles by himself ? i am a veryh dumb python user
it's work now, you was write the issue was the open mp lib
Thanks a lot for your help and time 🙂
j
Thanks for the updates. So the fix was to install openmp?
r
Exactly and when provide the correct path to compiler adding recommended flag in the shell user profile file
just this
i used brew's libomp and brew's gcc compiler
j
I see. We use clang to compile for macos and link brew's libomp, however we also include libomp in the wheels which may be what is causing the conflict. Sorry for the troubles. So it's working for you now?
r
Yes it’s working fine. I will test the solution with clang compiler on one other station, I will write you back