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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...