This repository contains an example how PM4Py can be used with the Deep Learning Toolkit App for Splunk (DLTK). Please note that PM4Py is licensed under GPL which states that any derivative work must be published under the same license. Therefore this example is published separately under GPL license. For more information see PM4Py licensing options.
In order to run the example provided in this repo please follow these steps:
For quick testing you can pip install PM4Py into your running DLTK Container with the following steps:
- Get the container ID with
docker ps
- Access the container with
docker exec -it -u 0 <your_container_id> /bin/bash
- Install PM4Py with
pip install pm4py
- Install graphviz with
apt-get update --fix-missing && apt-get -y install graphviz
For persistent usage in your container you can build PM4Py and its dependencies directly into your own DLTK container.
- Git clone your DLTK compatible container:
- DLTK 3.x compatible: git clone from MLTK Container
- DLTK 4.x compatible: git clone from DLTK 4.x
- Add
RUN apt-get update --fix-missing && apt-get -y install graphviz
to install graphviz - Add
RUN pip install pm4py
- Build your container with existing build scripts or manually.
In this repository you essentially find 2 files that make up the combined example of a Splunk dashboard and a DLTK Jupyter notebook that runs PM4Py.
The dashboard examples is contained in the file example_process_mining.xml in this repository. You can either copy paste its content into a new dashboard that you create from the UI in Splunk OR you copy the file into the DLTK app into $SPLUNK_HOME/etc/apps/mltk-container/local/example_process_mining.xml
or another app local or default context where you want to have the dashboard.
The Jupyter notebook that contains the example code how to run PM4Py with DLTK is contained in the file process_mining.ipynb. You can import it into Jupyter Lab running in the MLTK/DLTK container and make yourself familiar with the steps taken to run, e.g. an inductive miner or dfg discovery and return petrinets or dfg graphs into the Splunk dashboard either as a static image or as an interactive visualization.
The example dashboard uses the Process Flow Diagram App to interactively visualize the results of PM4Py formatted as graphviz dot notation. The visualization component can also run in other modes, please find more information in its documentation.
This repository contains all necessary steps and artifacts that you need to run a complete end to end process mining example with Splunk, DLTK and PM4Py.