Skip to main content

IDOL - Incremental DAG Optimization for Learning CLI

Project description

IDOL - Incremental DAG Optimization for Learning

CI Python 3.9+ License: MIT Code style: ruff

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:

  1. Automatic candidate generation using task-specific heuristics
  2. Human review interface for label validation and correction
  3. 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 dataset
  • rca_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:

  1. job_info - Job success/failure status
  2. gpu_hw_analysis - GPU hardware failure detection (XIDs/SXIDs)
  3. logs_analysis - Software errors and numerical instability
  4. health_checks - System health status
  5. scheduler_analysis - Scheduler termination analysis
  6. network_analysis - Network/InfiniBand issues
  7. storage_analysis - Storage I/O and metadata spikes
  8. 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

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Ensure all tests pass
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idol_cli-0.1.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idol_cli-0.1.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

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

Hashes for idol_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08b5e282fc711b55b33d71c4aebce84ae25c5a452d6e63b88d6ae04e0a5e0729
MD5 94d8a1383a2395ec32d3a9b99bb1861b
BLAKE2b-256 8e94e63b03bbf23c1fddf5fa6eaa2527701ceb4315aa8ce1cc2298b62baa52c7

See more details on using hashes here.

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

Hashes for idol_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9261ea8b6981cf7c91b359aced3b20884fed6de747d5de9346e5d4df830f93fa
MD5 f001a346e0a403a0c476c6177fdae379
BLAKE2b-256 23da1f0cc2dc197440addd9308716cb94ce1839f34c44b2128309a2ab8ee35b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page