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!

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...

Join Us at the Builder Bar at .conf24 – Empowering Innovation and Collaboration

What is the Builder Bar? The Builder Bar is more than just a place; it's a hub of creativity, collaboration, ...

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...