Splunk IT Service Intelligence

Splunk Machine Learning Toolkit: Error in Loading custom algorithm

bangalorep
Communicator

When trying a custom algorithm on the Machine Learning Toolkit I'm getting the error
Error in 'fit' command: Error while initializing algorithm "test": Failed to load algorithm "algos.test".
The algorithm is registered. I have all the right versions of the required packages. I have added the pymc library as the code uses functions from this library.

What else could be causing this issue?

493669
Super Champion

have you installed Python for Scientific Computing? please install it as per your OS

0 Karma

astein_splunk
Splunk Employee
Splunk Employee

the error comes from the fit command not finding the algorithm file at all. are permissions set correctly ? is the algorithm file in the MLTK or a 2nd app ?

0 Karma

samsearcher
Engager

I'm having this same issue and it is occurring in a custom 2nd app (barebones setup).  I have the MLTK installed along with the accompanying package for scientific computing.  

I've created a custom Splunk app (barebones) from the Splunk UI.  I've added a custom algorithm in the algos subdirectory and modified the algos.conf (added [MyAlgorithm]) appropriately.  When I try to call this algorithm from the Spunk UI Search box using fit it can't load the algorithm (doesn't even get to running the code). This all works fine if I do the same thing in the  Splunk_ML_Toolkit app (put the algorithm there etc).  Is there some permissions setting I'm missing or something?
02-10-2022 16:15:08.046 ERROR dispatchRunner [15506 MainThread] - RunDispatch::runDispatchThread threw error: Error in 'fit' command: Error while initializing algorithm "MyAlgorithm": Failed to load algorithm "algos.MyAlgorithm"

 

0 Karma

bangalorep
Communicator

I have installed it as per my OS.
I'm using Splunk Machine Learning Toolkit version 3.4.0 and Python for Scientific Computing version 1.13.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...