About the compute command

The Splunk App for Data Science and Deep Learning (DSDL) version 5.2.0 introduces the compute command. This command provides an alternative to the fit command from the Splunk Machine Learning Toolkit (MLTK), and accelerates the DSDL search.

The compute command is a streaming command that uses Python functions in the DSDL container without creating a model.

When you use the compute in a pipeline, the search results and parameters specified in the key:value format are sent to the FastAPI endpoint on the container side. During the data flow, the search results are kept in JSON format without any conversion. Similarly, the computation results are generated and received in JSON format when using compute.

When using the compute command, only the compute() module of the Python code is called, limiting the workflow to the necessary parts and increasing search concurrency. When tested on the same computations in DSDL, the compute command is more efficient with a shorter runtime than the fit command.

The compute command is unlike the fit command, which converts search results into a Pandas DataFrame. The fit command follows a specific workflow in which a model file must be created. This requirement limits search concurrency when using fit for Python functions that do not need a model created.