datasynth-runtime
Runtime orchestration, parallel execution, and memory management.
Overview
datasynth-runtime provides the execution layer for SyntheticData:
- GenerationOrchestrator: Coordinates the complete generation workflow
- Parallel Execution: Multi-threaded generation with Rayon
- Memory Management: Integration with memory guard for OOM prevention
- Progress Tracking: Real-time progress reporting with pause/resume
Key Components
| Component | Description |
|---|---|
GenerationOrchestrator |
Main workflow coordinator |
EnhancedOrchestrator |
Extended orchestrator with all enterprise features |
ParallelExecutor |
Thread pool management |
ProgressTracker |
Progress bars and status reporting |
Generation Workflow
The generate() method orchestrates 19 focused phase methods in sequence:
- Chart of Accounts: CoA generation with industry-specific structures
- Master Data: Vendors, customers, materials, fixed assets, employees
- Document Flows: P2P and O2C document chain generation
- OCPM Events: OCEL 2.0 event log generation
- Journal Entries: JEs from document flows and standalone transactions
- Anomaly Injection: Entity-aware anomaly injection with risk-adjusted rates
- Balance Validation: Balance sheet equation verification
- Data Quality: Typos, missing values, format variations injection
- Audit Data: Engagements, workpapers, evidence, findings, judgments
- Banking Data: KYC/AML banking transaction generation
- Graph Export: PyTorch Geometric, Neo4j, DGL, RustGraph export
- Hypergraph Export: Multi-layer hypergraph for RustGraph 13-15. (Reserved)
- HR (v0.6.0): Payroll runs, time entries, expense reports
- Accounting Standards (v0.6.0): Revenue recognition, impairment testing, financial statements
- Manufacturing (v0.6.0): Production orders, quality inspections, cycle counts
- Sales/KPIs/Budgets (v0.6.0): Sales quotations, management KPIs, budget plans
Snapshot Structs (v0.6.0)
Each new phase produces a typed snapshot that feeds into downstream phases:
| Snapshot | Contents |
|---|---|
HrSnapshot |
Payroll runs, time entries, expense reports |
AccountingStandardsSnapshot |
Revenue schedules, impairment results, financial statements |
ManufacturingSnapshot |
Production orders, quality inspections, cycle counts |
SalesKpiBudgetsSnapshot |
Sales quotes, KPI metrics, budget plans with variances |
Usage
use GenerationOrchestrator;
let orchestrator = new?;
// Full generation
orchestrator.run?;
// With progress callback
orchestrator.run_with_progress?;
Pause/Resume
On Unix systems, send SIGUSR1 to toggle pause:
License
Apache-2.0 - See LICENSE for details.