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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...