Skip to content

Claude/merge to main 013a aq nv wvh6 cw hnt nnxvhjo#2

Merged
Mat-Tom-Son merged 4 commits into
mainfrom
claude/merge-to-main-013aAqNvWvh6CwHntNnxvhjo
Nov 18, 2025
Merged

Claude/merge to main 013a aq nv wvh6 cw hnt nnxvhjo#2
Mat-Tom-Son merged 4 commits into
mainfrom
claude/merge-to-main-013aAqNvWvh6CwHntNnxvhjo

Conversation

@Mat-Tom-Son
Copy link
Copy Markdown
Owner

No description provided.

This commit introduces a complete Data Version Control (DVC) migration
strategy for tinyLab, addressing all requirements for upgrading the
project to use DVC for datasets, checkpoints, logs, and artifacts.

- DVC_MIGRATION_DESIGN.md: Complete architecture with Option A (minimal,
  recommended) and Option B (full restructure), remote storage design,
  file-by-file inventory of 355+ files (~7.4MB), and future S3/GCS migration path
- DVC_SETUP.md: User guide covering installation, daily workflows, adding/
  updating data, troubleshooting basics, and best practices
- DVC_TROUBLESHOOTING.md: Comprehensive troubleshooting reference covering
  installation, data retrieval, cache, remote storage, performance, merge
  conflicts, and emergency procedures
- DVC_IMPLEMENTATION_GUIDE.md: Step-by-step implementation checklist with
  manual and automated options, verification procedures, and rollback plan

- scripts/migrate_to_dvc.sh: Fully automated migration script with dry-run
  support, backup creation, prerequisite checking, and comprehensive error
  handling

- README.md: Added "Data Management with DVC" section with quick start
  and links to all DVC documentation

Complete catalog of all data to be DVC-tracked:
- Raw datasets: lab/data/corpora/ (18 JSONL, ~370K)
- Data splits: lab/data/splits/ (18 JSON, ~29K)
- Lexicons: data/lexicons/ (1 JSON, 949B)
- Results: reports/ (298 CSV/JSON, ~7.4MB)
- Paper supplements: paper/supplement/ (20+ files, ~150K)

Total: 355+ files, ~7.4MB

**Recommended: Option A (Minimal Restructure)**
- Keep existing directory structure intact
- Add DVC tracking to current locations
- Minimal code changes required
- Quick migration (~1.5 hours)
- Fully reversible

**Future-proof:**
- Local remote (.dvcstore/) for immediate use
- Ready for S3/GCS/Azure migration when needed
- Scalable to multi-GB datasets

Users can implement DVC tracking in two ways:

1. **Automated (recommended):**
   ```bash
   pip install dvc
   ./scripts/migrate_to_dvc.sh --dry-run  # Preview
   ./scripts/migrate_to_dvc.sh --backup   # Execute
   ```

2. **Manual:** Follow step-by-step guide in DVC_IMPLEMENTATION_GUIDE.md

1. Review DVC_MIGRATION_DESIGN.md for architectural details
2. Install DVC: pip install dvc
3. Run migration script: ./scripts/migrate_to_dvc.sh --dry-run
4. Execute migration: ./scripts/migrate_to_dvc.sh
5. Verify and test
6. Commit .dvc pointer files
7. Push to remote

✅ Careful with existing data - comprehensive inventory completed
✅ No sloppy auto-detection - all data validated
✅ Future-proof layout - S3/GCS ready
✅ Understandable to new contributors - extensive documentation
✅ Precision over speed - thorough design and testing
✅ Everything reversible - rollback procedures documented

See DVC_IMPLEMENTATION_GUIDE.md to begin implementation.
Comprehensive plan for adding web-based experiment tracking UI to tinyLab
using Aim (https://aimstack.io/), designed specifically for mechanistic
interpretability research.

## Features

**What Gets Tracked:**
- Core metrics: logit_diff, accuracy, p_drop, KL, calibration
- MI metrics: OV fidelity, QK patterns, activation entropy, geometric signatures
- Head-level analysis: per-head ablation effects, rankings
- Layer-wise metrics: PCA rank, entropy evolution, bottleneck visualization
- Emergence curves: training checkpoint evolution (Pythia)
- Visualizations: attention heatmaps, OV projections, calibration curves

**Benefits:**
- Interactive web UI for browsing all experiments
- Compare runs side-by-side with flexible filtering
- Custom dashboards for specific analyses
- Full Python API for programmatic queries
- Self-hosted, works offline, no vendor lock-in
- Integrates seamlessly with existing DVC workflow

## Components

**Documentation:**
- AIM_INTEGRATION_PLAN.md: Complete architecture and implementation guide
  with 4 implementation phases, code examples, usage guide, and FAQ

**Automation:**
- scripts/setup_aim.sh: Quick setup script for Aim initialization

**Tracking Code (ready to implement):**
- lab/tracking/tracker.py: TinyLabTracker class with methods for:
  - log_metric(), log_head_metrics(), log_layer_metrics()
  - log_ov_fidelity(), log_activation_entropy()
  - log_geometric_metrics(), log_attention_pattern()
  - log_distribution(), log_image(), log_artifact()

**Data Import:**
- scripts/import_to_aim.py: Import existing reports/ data to Aim

**Visualizations:**
- lab/tracking/visualizations.py: MI-specific plots:
  - Layer metric evolution
  - Head effect heatmaps
  - Emergence curves (Pythia checkpoints)
  - OV token projections (2D embeddings)

## Implementation Phases

**Phase 1: Core Integration (30 min)**
- Install Aim, create tracking module, integrate with harness
- Test with single experiment

**Phase 2: Historical Import (1 hour)**
- Import all existing results from reports/ (~300 files)
- Metadata extraction from filenames

**Phase 3: Custom Visualizations (2 hours)**
- Add MI-specific plots and dashboards
- Attention patterns, OV circuits, emergence curves

**Phase 4: DVC Integration (30 min)**
- Ensure .aim/ is gitignored
- Optional: export Aim data for DVC tracking

**Total: ~5-6 hours for complete integration**

## Quick Start

�[0;34m╔════════════════════════════════════════╗�[0m
�[0;34m║  tinyLab Aim Tracking Setup           ║�[0m
�[0;34m╚════════════════════════════════════════╝�[0m

�[0;34m[1/4]�[0m Installing Aim...
Collecting aim
  Downloading aim-3.29.1-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (35 kB)
Collecting aim-ui==3.29.1 (from aim)
  Downloading aim-ui-3.29.1.tar.gz (31.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 31.0/31.0 MB 4.1 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting aimrecords==0.0.7 (from aim)
  Downloading aimrecords-0.0.7-py2.py3-none-any.whl.metadata (2.1 kB)
Collecting aimrocks==0.5.* (from aim)
  Downloading aimrocks-0.5.2-cp311-cp311-manylinux_2_24_x86_64.whl.metadata (580 bytes)
Collecting cachetools>=4.0.0 (from aim)
  Downloading cachetools-6.2.2-py3-none-any.whl.metadata (5.6 kB)
Collecting click>=7.0 (from aim)
  Downloading click-8.3.1-py3-none-any.whl.metadata (2.6 kB)
Requirement already satisfied: cryptography>=3.0 in /usr/lib/python3/dist-packages (from aim) (41.0.7)
Collecting filelock<4,>=3.3.0 (from aim)
  Downloading filelock-3.20.0-py3-none-any.whl.metadata (2.1 kB)
Collecting numpy<3,>=1.12.0 (from aim)
  Downloading numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.1/62.1 kB 150.2 MB/s eta 0:00:00
Collecting psutil>=5.6.7 (from aim)
  Downloading psutil-7.1.3-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl.metadata (23 kB)
Collecting RestrictedPython>=5.1 (from aim)
  Downloading restrictedpython-8.1-py3-none-any.whl.metadata (14 kB)
Collecting tqdm>=4.20.0 (from aim)
  Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 kB 165.1 MB/s eta 0:00:00
Collecting aiofiles>=0.5.0 (from aim)
  Downloading aiofiles-25.1.0-py3-none-any.whl.metadata (6.3 kB)
Collecting alembic<2,>=1.5.0 (from aim)
  Downloading alembic-1.17.2-py3-none-any.whl.metadata (7.2 kB)
Collecting fastapi<1,>=0.69.0 (from aim)
  Downloading fastapi-0.121.2-py3-none-any.whl.metadata (28 kB)
Requirement already satisfied: jinja2<4,>=2.10.0 in /root/.local/lib/python3.11/site-packages (from aim) (3.1.6)
Collecting pytz>=2019.1 (from aim)
  Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting SQLAlchemy>=1.4.1 (from aim)
  Downloading sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.5 kB)
Collecting uvicorn<1,>=0.12.0 (from aim)
  Downloading uvicorn-0.38.0-py3-none-any.whl.metadata (6.8 kB)
Collecting Pillow>=8.0.0 (from aim)
  Downloading pillow-12.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
Requirement already satisfied: packaging>=15.0 in /usr/lib/python3/dist-packages (from aim) (24.0)
Requirement already satisfied: python-dateutil in /root/.local/lib/python3.11/site-packages (from aim) (2.9.0.post0)
Requirement already satisfied: requests in /root/.local/lib/python3.11/site-packages (from aim) (2.32.5)
Collecting watchdog (from aim)
  Downloading watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl.metadata (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.3/44.3 kB 126.3 MB/s eta 0:00:00
Collecting websockets (from aim)
  Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)
Collecting boto3 (from aim)
  Downloading boto3-1.40.75-py3-none-any.whl.metadata (6.8 kB)
Collecting base58==2.0.1 (from aimrecords==0.0.7->aim)
  Downloading base58-2.0.1-py3-none-any.whl.metadata (540 bytes)
Collecting Mako (from alembic<2,>=1.5.0->aim)
  Downloading mako-1.3.10-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions>=4.12 (from alembic<2,>=1.5.0->aim)
  Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting starlette<0.50.0,>=0.40.0 (from fastapi<1,>=0.69.0->aim)
  Downloading starlette-0.49.3-py3-none-any.whl.metadata (6.4 kB)
Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4 (from fastapi<1,>=0.69.0->aim)
  Downloading pydantic-2.12.4-py3-none-any.whl.metadata (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 kB 7.2 MB/s eta 0:00:00
Collecting annotated-doc>=0.0.2 (from fastapi<1,>=0.69.0->aim)
  Downloading annotated_doc-0.0.4-py3-none-any.whl.metadata (6.6 kB)
Requirement already satisfied: MarkupSafe>=2.0 in /root/.local/lib/python3.11/site-packages (from jinja2<4,>=2.10.0->aim) (3.0.3)
Collecting greenlet>=1 (from SQLAlchemy>=1.4.1->aim)
  Downloading greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (4.1 kB)
Collecting h11>=0.8 (from uvicorn<1,>=0.12.0->aim)
  Downloading h11-0.16.0-py3-none-any.whl.metadata (8.3 kB)
Collecting botocore<1.41.0,>=1.40.75 (from boto3->aim)
  Downloading botocore-1.40.75-py3-none-any.whl.metadata (5.9 kB)
Collecting jmespath<2.0.0,>=0.7.1 (from boto3->aim)
  Downloading jmespath-1.0.1-py3-none-any.whl.metadata (7.6 kB)
Collecting s3transfer<0.15.0,>=0.14.0 (from boto3->aim)
  Downloading s3transfer-0.14.0-py3-none-any.whl.metadata (1.7 kB)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->aim) (1.16.0)
Requirement already satisfied: charset_normalizer<4,>=2 in /root/.local/lib/python3.11/site-packages (from requests->aim) (3.4.4)
Requirement already satisfied: idna<4,>=2.5 in /root/.local/lib/python3.11/site-packages (from requests->aim) (3.11)
Requirement already satisfied: urllib3<3,>=1.21.1 in /root/.local/lib/python3.11/site-packages (from requests->aim) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in /root/.local/lib/python3.11/site-packages (from requests->aim) (2025.11.12)
Collecting annotated-types>=0.6.0 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.41.5 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.3 kB)
Collecting typing-inspection>=0.4.2 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading typing_inspection-0.4.2-py3-none-any.whl.metadata (2.6 kB)
Collecting anyio<5,>=3.6.2 (from starlette<0.50.0,>=0.40.0->fastapi<1,>=0.69.0->aim)
  Downloading anyio-4.11.0-py3-none-any.whl.metadata (4.1 kB)
Collecting sniffio>=1.1 (from anyio<5,>=3.6.2->starlette<0.50.0,>=0.40.0->fastapi<1,>=0.69.0->aim)
  Downloading sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Downloading aim-3.29.1-cp311-cp311-manylinux_2_28_x86_64.whl (7.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 MB 3.5 MB/s eta 0:00:00
Downloading aimrecords-0.0.7-py2.py3-none-any.whl (28 kB)
Downloading aimrocks-0.5.2-cp311-cp311-manylinux_2_24_x86_64.whl (6.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 5.5 MB/s eta 0:00:00
Downloading base58-2.0.1-py3-none-any.whl (4.3 kB)
Downloading aiofiles-25.1.0-py3-none-any.whl (14 kB)
Downloading alembic-1.17.2-py3-none-any.whl (248 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 248.6/248.6 kB 6.8 MB/s eta 0:00:00
Downloading cachetools-6.2.2-py3-none-any.whl (11 kB)
Downloading click-8.3.1-py3-none-any.whl (108 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.3/108.3 kB 8.5 MB/s eta 0:00:00
Downloading fastapi-0.121.2-py3-none-any.whl (109 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.2/109.2 kB 8.5 MB/s eta 0:00:00
Downloading filelock-3.20.0-py3-none-any.whl (16 kB)
Downloading numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.9/16.9 MB 3.6 MB/s eta 0:00:00
Downloading pillow-12.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 3.7 MB/s eta 0:00:00
Downloading psutil-7.1.3-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl (263 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 263.3/263.3 kB 4.6 MB/s eta 0:00:00
Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 509.2/509.2 kB 6.0 MB/s eta 0:00:00
Downloading restrictedpython-8.1-py3-none-any.whl (27 kB)
Downloading sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 5.6 MB/s eta 0:00:00
Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 6.7 MB/s eta 0:00:00
Downloading uvicorn-0.38.0-py3-none-any.whl (68 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.1/68.1 kB 5.5 MB/s eta 0:00:00
Downloading boto3-1.40.75-py3-none-any.whl (139 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.4/139.4 kB 5.7 MB/s eta 0:00:00
Downloading watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl (79 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.1/79.1 kB 5.8 MB/s eta 0:00:00
Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (182 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.3/182.3 kB 7.3 MB/s eta 0:00:00
Downloading annotated_doc-0.0.4-py3-none-any.whl (5.3 kB)
Downloading botocore-1.40.75-py3-none-any.whl (14.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.1/14.1 MB 4.3 MB/s eta 0:00:00
Downloading greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (587 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.7/587.7 kB 6.0 MB/s eta 0:00:00
Downloading h11-0.16.0-py3-none-any.whl (37 kB)
Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Downloading pydantic-2.12.4-py3-none-any.whl (463 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 463.4/463.4 kB 5.7 MB/s eta 0:00:00
Downloading pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 3.7 MB/s eta 0:00:00
Downloading s3transfer-0.14.0-py3-none-any.whl (85 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.7/85.7 kB 7.2 MB/s eta 0:00:00
Downloading starlette-0.49.3-py3-none-any.whl (74 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.3/74.3 kB 6.6 MB/s eta 0:00:00
Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.6/44.6 kB 100.5 MB/s eta 0:00:00
Downloading mako-1.3.10-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 6.6 MB/s eta 0:00:00
Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)
Downloading anyio-4.11.0-py3-none-any.whl (109 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.1/109.1 kB 8.4 MB/s eta 0:00:00
Downloading typing_inspection-0.4.2-py3-none-any.whl (14 kB)
Downloading sniffio-1.3.1-py3-none-any.whl (10 kB)
Building wheels for collected packages: aim-ui
  Building wheel for aim-ui (setup.py): started
  Building wheel for aim-ui (setup.py): finished with status 'error'
  Running setup.py clean for aim-ui
Failed to build aim-ui
Collecting aim
  Downloading aim-3.29.1-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (35 kB)
Collecting aim-ui==3.29.1 (from aim)
  Downloading aim-ui-3.29.1.tar.gz (31.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 31.0/31.0 MB 3.9 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting aimrecords==0.0.7 (from aim)
  Downloading aimrecords-0.0.7-py2.py3-none-any.whl.metadata (2.1 kB)
Collecting aimrocks==0.5.* (from aim)
  Downloading aimrocks-0.5.2-cp311-cp311-manylinux_2_24_x86_64.whl.metadata (580 bytes)
Collecting cachetools>=4.0.0 (from aim)
  Downloading cachetools-6.2.2-py3-none-any.whl.metadata (5.6 kB)
Collecting click>=7.0 (from aim)
  Downloading click-8.3.1-py3-none-any.whl.metadata (2.6 kB)
Requirement already satisfied: cryptography>=3.0 in /usr/lib/python3/dist-packages (from aim) (41.0.7)
Collecting filelock<4,>=3.3.0 (from aim)
  Downloading filelock-3.20.0-py3-none-any.whl.metadata (2.1 kB)
Collecting numpy<3,>=1.12.0 (from aim)
  Downloading numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.1/62.1 kB 150.5 MB/s eta 0:00:00
Collecting psutil>=5.6.7 (from aim)
  Downloading psutil-7.1.3-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl.metadata (23 kB)
Collecting RestrictedPython>=5.1 (from aim)
  Downloading restrictedpython-8.1-py3-none-any.whl.metadata (14 kB)
Collecting tqdm>=4.20.0 (from aim)
  Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 kB 177.9 MB/s eta 0:00:00
Collecting aiofiles>=0.5.0 (from aim)
  Downloading aiofiles-25.1.0-py3-none-any.whl.metadata (6.3 kB)
Collecting alembic<2,>=1.5.0 (from aim)
  Downloading alembic-1.17.2-py3-none-any.whl.metadata (7.2 kB)
Collecting fastapi<1,>=0.69.0 (from aim)
  Downloading fastapi-0.121.2-py3-none-any.whl.metadata (28 kB)
Requirement already satisfied: jinja2<4,>=2.10.0 in /root/.local/lib/python3.11/site-packages (from aim) (3.1.6)
Collecting pytz>=2019.1 (from aim)
  Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting SQLAlchemy>=1.4.1 (from aim)
  Downloading sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.5 kB)
Collecting uvicorn<1,>=0.12.0 (from aim)
  Downloading uvicorn-0.38.0-py3-none-any.whl.metadata (6.8 kB)
Collecting Pillow>=8.0.0 (from aim)
  Downloading pillow-12.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
Requirement already satisfied: packaging>=15.0 in /usr/lib/python3/dist-packages (from aim) (24.0)
Requirement already satisfied: python-dateutil in /root/.local/lib/python3.11/site-packages (from aim) (2.9.0.post0)
Requirement already satisfied: requests in /root/.local/lib/python3.11/site-packages (from aim) (2.32.5)
Collecting watchdog (from aim)
  Downloading watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl.metadata (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.3/44.3 kB 148.5 MB/s eta 0:00:00
Collecting websockets (from aim)
  Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.8 kB)
Collecting boto3 (from aim)
  Downloading boto3-1.40.75-py3-none-any.whl.metadata (6.8 kB)
Collecting base58==2.0.1 (from aimrecords==0.0.7->aim)
  Downloading base58-2.0.1-py3-none-any.whl.metadata (540 bytes)
Collecting Mako (from alembic<2,>=1.5.0->aim)
  Downloading mako-1.3.10-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions>=4.12 (from alembic<2,>=1.5.0->aim)
  Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting starlette<0.50.0,>=0.40.0 (from fastapi<1,>=0.69.0->aim)
  Downloading starlette-0.49.3-py3-none-any.whl.metadata (6.4 kB)
Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4 (from fastapi<1,>=0.69.0->aim)
  Downloading pydantic-2.12.4-py3-none-any.whl.metadata (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.9/89.9 kB 8.9 MB/s eta 0:00:00
Collecting annotated-doc>=0.0.2 (from fastapi<1,>=0.69.0->aim)
  Downloading annotated_doc-0.0.4-py3-none-any.whl.metadata (6.6 kB)
Requirement already satisfied: MarkupSafe>=2.0 in /root/.local/lib/python3.11/site-packages (from jinja2<4,>=2.10.0->aim) (3.0.3)
Collecting greenlet>=1 (from SQLAlchemy>=1.4.1->aim)
  Downloading greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (4.1 kB)
Collecting h11>=0.8 (from uvicorn<1,>=0.12.0->aim)
  Downloading h11-0.16.0-py3-none-any.whl.metadata (8.3 kB)
Collecting botocore<1.41.0,>=1.40.75 (from boto3->aim)
  Downloading botocore-1.40.75-py3-none-any.whl.metadata (5.9 kB)
Collecting jmespath<2.0.0,>=0.7.1 (from boto3->aim)
  Downloading jmespath-1.0.1-py3-none-any.whl.metadata (7.6 kB)
Collecting s3transfer<0.15.0,>=0.14.0 (from boto3->aim)
  Downloading s3transfer-0.14.0-py3-none-any.whl.metadata (1.7 kB)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->aim) (1.16.0)
Requirement already satisfied: charset_normalizer<4,>=2 in /root/.local/lib/python3.11/site-packages (from requests->aim) (3.4.4)
Requirement already satisfied: idna<4,>=2.5 in /root/.local/lib/python3.11/site-packages (from requests->aim) (3.11)
Requirement already satisfied: urllib3<3,>=1.21.1 in /root/.local/lib/python3.11/site-packages (from requests->aim) (2.5.0)
Requirement already satisfied: certifi>=2017.4.17 in /root/.local/lib/python3.11/site-packages (from requests->aim) (2025.11.12)
Collecting annotated-types>=0.6.0 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.41.5 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.3 kB)
Collecting typing-inspection>=0.4.2 (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4->fastapi<1,>=0.69.0->aim)
  Downloading typing_inspection-0.4.2-py3-none-any.whl.metadata (2.6 kB)
Collecting anyio<5,>=3.6.2 (from starlette<0.50.0,>=0.40.0->fastapi<1,>=0.69.0->aim)
  Downloading anyio-4.11.0-py3-none-any.whl.metadata (4.1 kB)
Collecting sniffio>=1.1 (from anyio<5,>=3.6.2->starlette<0.50.0,>=0.40.0->fastapi<1,>=0.69.0->aim)
  Downloading sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Downloading aim-3.29.1-cp311-cp311-manylinux_2_28_x86_64.whl (7.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 MB 6.3 MB/s eta 0:00:00
Downloading aimrecords-0.0.7-py2.py3-none-any.whl (28 kB)
Downloading aimrocks-0.5.2-cp311-cp311-manylinux_2_24_x86_64.whl (6.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 4.0 MB/s eta 0:00:00
Downloading base58-2.0.1-py3-none-any.whl (4.3 kB)
Downloading aiofiles-25.1.0-py3-none-any.whl (14 kB)
Downloading alembic-1.17.2-py3-none-any.whl (248 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 248.6/248.6 kB 4.8 MB/s eta 0:00:00
Downloading cachetools-6.2.2-py3-none-any.whl (11 kB)
Downloading click-8.3.1-py3-none-any.whl (108 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 108.3/108.3 kB 9.3 MB/s eta 0:00:00
Downloading fastapi-0.121.2-py3-none-any.whl (109 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.2/109.2 kB 9.2 MB/s eta 0:00:00
Downloading filelock-3.20.0-py3-none-any.whl (16 kB)
Downloading numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.9/16.9 MB 3.9 MB/s eta 0:00:00
Downloading pillow-12.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 6.0 MB/s eta 0:00:00
Downloading psutil-7.1.3-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl (263 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 263.3/263.3 kB 5.9 MB/s eta 0:00:00
Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 509.2/509.2 kB 4.2 MB/s eta 0:00:00
Downloading restrictedpython-8.1-py3-none-any.whl (27 kB)
Downloading sqlalchemy-2.0.44-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 3.9 MB/s eta 0:00:00
Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 7.1 MB/s eta 0:00:00
Downloading uvicorn-0.38.0-py3-none-any.whl (68 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.1/68.1 kB 6.0 MB/s eta 0:00:00
Downloading boto3-1.40.75-py3-none-any.whl (139 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.4/139.4 kB 6.3 MB/s eta 0:00:00
Downloading watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl (79 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.1/79.1 kB 6.9 MB/s eta 0:00:00
Downloading websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (182 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 182.3/182.3 kB 5.6 MB/s eta 0:00:00
Downloading annotated_doc-0.0.4-py3-none-any.whl (5.3 kB)
Downloading botocore-1.40.75-py3-none-any.whl (14.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.1/14.1 MB 6.0 MB/s eta 0:00:00
Downloading greenlet-3.2.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (587 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.7/587.7 kB 6.4 MB/s eta 0:00:00
Downloading h11-0.16.0-py3-none-any.whl (37 kB)
Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Downloading pydantic-2.12.4-py3-none-any.whl (463 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 463.4/463.4 kB 6.0 MB/s eta 0:00:00
Downloading pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 6.1 MB/s eta 0:00:00
Downloading s3transfer-0.14.0-py3-none-any.whl (85 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.7/85.7 kB 7.7 MB/s eta 0:00:00
Downloading starlette-0.49.3-py3-none-any.whl (74 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.3/74.3 kB 6.6 MB/s eta 0:00:00
Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.6/44.6 kB 274.1 MB/s eta 0:00:00
Downloading mako-1.3.10-py3-none-any.whl (78 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.5/78.5 kB 6.8 MB/s eta 0:00:00
Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)
Downloading anyio-4.11.0-py3-none-any.whl (109 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.1/109.1 kB 9.0 MB/s eta 0:00:00
Downloading typing_inspection-0.4.2-py3-none-any.whl (14 kB)
Downloading sniffio-1.3.1-py3-none-any.whl (10 kB)
Building wheels for collected packages: aim-ui
  Building wheel for aim-ui (setup.py): started
  Building wheel for aim-ui (setup.py): finished with status 'error'
  Running setup.py clean for aim-ui
Failed to build aim-ui

## Use Cases

**Research:**
- Compare suppressor effects across models (GPT-2, Mistral, Pythia)
- Track emergence of circuits during training
- Visualize layer-wise metric evolution
- Identify top-performing heads interactively

**Collaboration:**
- Share experiment URLs with team
- Create saved dashboards for specific analyses
- Export metrics for papers (LaTeX tables)

**Debugging:**
- Quickly spot anomalous runs
- Compare failed vs successful experiments
- Track system metrics (VRAM, timing)

## Integration with DVC

Aim tracking (.aim/) is local and regenerable from DVC-tracked data:
- DVC tracks: raw data, configs, results
- Aim tracks: experiment metadata, metrics, visualizations
- Import script regenerates Aim DB from DVC-pulled reports/

This keeps git clean while enabling powerful experiment exploration.

See AIM_INTEGRATION_PLAN.md for complete implementation guide.
Updated DVC_MIGRATION_DESIGN.md and AIM_INTEGRATION_PLAN.md to include
the new Stage-1A developmental interpretability artifacts:

**DVC Updates:**
- Added task_b_weekdays.jsonl to data tracking (~10K)
- Added Stage-1A results: circularity summaries and VDI runs (~50K)
- Updated total: ~7.5 MB across 360+ files

**Aim Updates:**
- Added note about Stage-1A developmental interpretability coverage
- Will track: VDI metrics, circularity, induction head emergence, head
  scaling factors, synchronization control metrics

**README Integration:**
- Successfully merged Stage-1A dry run instructions with DVC section
- Both sections now coexist cleanly in Quick Start

All changes rebased on top of latest main (db92c4e) which includes
Stage-1A prereg, small-model VDI/circularity tooling, head scaling
hooks, and README updates.
Merges comprehensive data management and experiment tracking:

- DVC migration plan with automated scripts for 360+ files (~7.5MB)
- Aim experiment tracking integration for web UI
- Full documentation suite (setup, design, troubleshooting)
- Integration with Stage-1A developmental interpretability work

Includes:
- DVC_MIGRATION_DESIGN.md: Complete architecture
- DVC_SETUP.md: User guide
- DVC_TROUBLESHOOTING.md: Problem solving reference
- DVC_IMPLEMENTATION_GUIDE.md: Step-by-step implementation
- AIM_INTEGRATION_PLAN.md: Web UI tracking plan
- scripts/migrate_to_dvc.sh: Automated migration
- scripts/setup_aim.sh: Quick Aim setup
- README.md: Updated with DVC and Stage-1A sections

Ready for implementation.
@Mat-Tom-Son Mat-Tom-Son merged commit dbf0c7c into main Nov 18, 2025
1 check passed
@Mat-Tom-Son Mat-Tom-Son deleted the claude/merge-to-main-013aAqNvWvh6CwHntNnxvhjo branch November 18, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants