How ghsrg/bpm_prediction works
This repository is a research toolkit for next-activity prediction in business processes, especially when process topology changes between versions. The main workflow configures an experiment, ingests event logs and process structure, builds version-aware graph/model inputs, then trains or evaluates predictions and records metrics. Separate topology-preparation commands persist reusable structure artifacts; desktop interfaces support experiment setup and execution. The tree and excerpts show a parallel legacy etalon graph-learning toolkit as well. Some links below rely on README descriptions or SOURCE INDEX references; unsampled implementation details are not assumed.
Main entry points: cli.py Experiment CLI · trainer.py Training and evaluation · train_pipeline.py Legacy learning pipelines · main.py Command entrypoint
Components 23
Experiment entrypoints
- Command entrypoint
main.py - Experiment CLI
src/cli.py - Desktop experiment UI
tools/desktop_ui/main_window.py
Data and topology
- XES ingestion
src/adapters/ingestion/xes_adapter.py - Camunda trace adapter
src/adapters/ingestion/camunda_trace_adapter.py - BPMN structure parser
src/application/services/bpmn_structure_parser_service.py - Topology ingestion command
tools/ingest_topology.py - Topology extraction
src/application/services/topology_extractor_service.py - Versioned process structure
src/domain/entities/process_structure.py
Prediction workflow
- Training and evaluation
src/application/use_cases/trainer.py - Dynamic graph building
src/domain/services/dynamic_graph_builder.py - Model selection
src/domain/models/factory.py - Topology-conditioned model
src/domain/models/topology_conditioned.py - Topology-native candidates
src/domain/entities/candidate_prediction.py
Artifacts and tracking
- Knowledge graph contract
src/domain/ports/knowledge_graph_port.py - Knowledge graph repositories
src/infrastructure/repositories/knowledge_graph_repository_factory.py - MLflow metrics and traces
src/infrastructure/tracking/mlflow_tracker.py
Legacy toolkit
- Legacy toolkit entrypoint
etalon/main.py - Legacy learning pipelines
etalon/src/pipelines/train_pipeline.py - Legacy graph model families
etalon/src/core - Legacy data and checkpoint utilities
etalon/src/utils/file_utils.py - Legacy result visualization
etalon/src/utils/visualizer.py
Other components
- Researcher
Connections 23
- Researcher → Command entrypoint: runs commands
- Command entrypoint → Experiment CLI: dispatches experiments
main.py - Researcher → Desktop experiment UI: configures runs
- Command entrypoint → Topology ingestion command: dispatches topology
main.py - Experiment CLI → XES ingestion: uses adapter
src/cli.py - Experiment CLI → Camunda trace adapter: uses adapter
src/cli.py - Topology ingestion command → BPMN structure parser: parses structure
tools/ingest_topology.py - Topology ingestion command → Topology extraction: extracts topology
tools/ingest_topology.py - BPMN structure parser → Versioned process structure: builds DTO
src/application/services/bpmn_structure_parser_service.py - Topology extraction → Versioned process structure: produces structure
src/application/services/topology_extractor_service.py - Topology extraction → Knowledge graph contract: uses persistence port
src/application/services/topology_extractor_service.py - Experiment CLI → Training and evaluation: starts workflow
src/cli.py - Training and evaluation → Dynamic graph building: builds graph inputs
- Training and evaluation → Model selection: selects model
src/cli.py - Model selection → Topology-conditioned model: creates model
src/domain/models/topology_conditioned.py - Topology-conditioned model → Topology-native candidates: scores candidates
src/domain/models/topology_conditioned.py - Knowledge graph contract → Knowledge graph repositories: implemented by
src/infrastructure/repositories/knowledge_graph_repository_factory.py - Experiment CLI → Knowledge graph repositories: resolves repository
src/cli.py - Training and evaluation → MLflow metrics and traces: records metrics
- Legacy toolkit entrypoint → Legacy learning pipelines: dispatches modes
etalon/main.py - Legacy learning pipelines → Legacy graph model families: trains models
etalon/src/pipelines/train_pipeline.py - Legacy learning pipelines → Legacy data and checkpoint utilities: loads and saves
etalon/src/pipelines/train_pipeline.py - Legacy learning pipelines → Legacy result visualization: plots results
etalon/src/pipelines/train_pipeline.py