IDOL - Incremental DAG Optimization for Learning CLI
Project description
IDOL - Incremental DAG Optimization for Learning
Transform debug traces into validated golden datasets for ML training pipelines.
Overview
IDOL is a CLI tool that processes debug trace JSON files to create high-quality labeled datasets through:
- Automatic candidate generation using task-specific heuristics
- Human review interface for label validation and correction
- Dataset freezing with validation and optional train/holdout splits
Features
- 🎯 Deterministic ID generation ensures idempotent operations
- 📝 JSONL format enables git-friendly diffs and streaming processing
- ⚡ Memory-efficient parsing of large JSON files
- 🔍 8 task-specific heuristics for automatic labeling
- ✅ Interactive review with accept/negate/edit options
- ❄️ Dataset validation before freezing
- 📊 Train/holdout splits for ML evaluation
Installation
# Clone the repository
git clone <repository-url>
cd auto-taskopt
# Install dependencies
pip install -e .
# Or install from requirements
pip install -r requirements.txt
Quick Start
# 1. Harvest candidates from debug traces
idol harvest examples/20250912_121325/
# 2. Review candidates for a specific task
idol review --task gpu_hw_analysis
# 3. Freeze validated dataset
idol freeze --task gpu_hw_analysis
# Check status
idol status
Usage
Harvest: Generate Candidates
Process debug trace JSON files to extract task executions and generate candidates:
# Process a single file
idol harvest trace.json
# Process all JSON files in a directory
idol harvest examples/
# Verbose output
idol harvest examples/ -v
The harvest command:
- Parses debug traces to extract task executions
- Generates stable SHA1-based IDs
- Applies task-specific heuristics for auto-labeling
- Saves candidates to
rca_gold/candidates/<task>.jsonl
Review: Validate Labels
Interactively review and correct auto-generated labels:
# Review all pending candidates for a task
idol review --task gpu_hw_analysis
# Review only first 10 items
idol review --task logs_analysis --max-items 10
Review options:
[a]Accept auto label[n]Negate (mark as 'no_issue')[e]Edit (provide custom JSON)[s]Skip[q]Quit
Freeze: Create Final Datasets
Merge candidates and overrides into validated datasets:
# Freeze a specific task
idol freeze --task gpu_hw_analysis
# Freeze all tasks
idol freeze
# Create train/holdout split (80/20)
idol freeze --task final_analysis --holdout
# Skip validation
idol freeze --task network_analysis --no-validate
Output files:
rca_gold/frozen/<task>.json- Main datasetrca_gold/frozen/<task>.holdout.json- Holdout set (if requested)
Additional Commands
# Show current status
idol status
# Clean all generated data
idol clean
Supported Tasks
IDOL supports 8 task types with specialized heuristics:
- job_info - Job success/failure status
- gpu_hw_analysis - GPU hardware failure detection (XIDs/SXIDs)
- logs_analysis - Software errors and numerical instability
- health_checks - System health status
- scheduler_analysis - Scheduler termination analysis
- network_analysis - Network/InfiniBand issues
- storage_analysis - Storage I/O and metadata spikes
- final_analysis - Root cause determination with confidence
Data Format
Candidate Record (JSONL)
{
"id": "abc123def456",
"task": "gpu_hw_analysis",
"input": {
"job_id": 4824587,
"attempt": 0,
"key_findings": "XID 48 hardware failure on node-001",
"tool_calls": [{"name": "job_summary", "args": {}}]
},
"auto": {
"result": "confirmed_hw_failure",
"evidence": "XIDs: [48]"
},
"status": "pending"
}
Frozen Dataset (JSON)
[
{
"id": "abc123def456",
"input": {
"job_id": 4824587,
"attempt": 0,
"key_findings": "...",
"tool_calls": []
},
"gold": {
"result": "confirmed_hw_failure",
"evidence": "Manual verification"
}
}
]
Project Structure
auto-taskopt/
├── src/idol/
│ ├── cli.py # CLI commands
│ ├── harvester.py # Candidate generation
│ ├── reviewer.py # Human review interface
│ ├── freezer.py # Dataset finalization
│ ├── heuristics.py # Task-specific rules
│ ├── models.py # Data models
│ └── utils.py # Utilities
├── tests/ # Test suite
├── examples/ # Sample debug traces
└── rca_gold/ # Generated data
├── candidates/ # JSONL candidates
├── overrides/ # Human corrections
└── frozen/ # Final datasets
Development
Running Tests
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src/idol --cov-report=term-missing
# Run specific test module
pytest tests/test_heuristics.py -v
Code Quality
# Lint code
ruff check src/ --fix
# Type checking
mypy src/idol/ --strict
Performance
- Harvest: Process 100 traces in <30 seconds
- Review: Display each candidate in <100ms
- Freeze: Validate 10,000 records in <5 seconds
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License - see LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file idol_cli-0.1.0.tar.gz.
File metadata
- Download URL: idol_cli-0.1.0.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b5e282fc711b55b33d71c4aebce84ae25c5a452d6e63b88d6ae04e0a5e0729
|
|
| MD5 |
94d8a1383a2395ec32d3a9b99bb1861b
|
|
| BLAKE2b-256 |
8e94e63b03bbf23c1fddf5fa6eaa2527701ceb4315aa8ce1cc2298b62baa52c7
|
File details
Details for the file idol_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: idol_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9261ea8b6981cf7c91b359aced3b20884fed6de747d5de9346e5d4df830f93fa
|
|
| MD5 |
f001a346e0a403a0c476c6177fdae379
|
|
| BLAKE2b-256 |
23da1f0cc2dc197440addd9308716cb94ce1839f34c44b2128309a2ab8ee35b1
|