All Apps and Add-ons

Error while initializing algorithm with a package of MLTK in docker container

dpark
Loves-to-Learn

Splunk Enterprise - 9.3.2
Splunk_ML_Toolkit: 5.4.2
PSC - 4.2.1

After deploying the custom Python package containing TestAlgo.py, the algorithm fails to initialize. I have confirmed installation of all required Python modules (pandas, scikit-learn, numpy, scipy) and verified directory ownership and the rebuilt PYTHONPATH. I suspect a persistent issue with Python path injection or a deeper structural configuration conflict.

Traceback (most recent call last):
File "/datastore/splunk/etc/apps/Splunk_ML_Toolkit/bin/chunked_controller.py", line 127, in initialize_processor
processor = processor_class(process_options, searchinfo)
File "/datastore/splunk/etc/apps/Splunk_ML_Toolkit/bin/processors/FitBatchProcessor.py", line 51, in __init__
self.algo = self.initialize_algo(self.algo_options, self.searchinfo)
File "/datastore/splunk/etc/apps/Splunk_ML_Toolkit/bin/processors/FitBatchProcessor.py", line 72, in initialize_algo
raise RuntimeError(
RuntimeError: Error while initializing algorithm "TestAlgo": TheTestAlgo algorithm cannot be initialized.

Could you help me why the algorithm is not initialized properly?

test_all_ml/local/algos.conf

[TestAlgo]
package=test_algos
disabled=false


test_all_ml/bin/test_algos/TestAlgo.py

from base import BaseAlgo

class TestAlgo(BaseAlgo):

def __init__(self, options, **kwargs):
super(TestAlgo, self).__init__(options, **kwargs)
self.model = None

def fit(self, df, args):
raise NotImplementedError("FIT SUCCESSFUL - LOGIC TEST")

def apply(self, df, args):
raise NotImplementedError("APPLY SUCCESSFUL - LOGIC TEST")
Labels (1)
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...