Fix sweep.py JSON serialization crash (StageConfig not serializable) #5

Open
opened 2026-05-01 14:01:26 +02:00 by sleepy · 0 comments
sleepy commented 2026-05-01 14:01:26 +02:00 (Migrated from localhost:18431)

Problem

scripts/sweep.py crashes with TypeError: Object of type StageConfig is not JSON serializable when trying to save results. This prevents Stage 2 from ever running.

Impact

  • Stage 1 completes (12 trials) but Stage 2 never starts
  • Results cannot be persisted properly for comparison

Fix Needed

Add a custom JSON encoder or convert StageConfig to dict before serialization.

Status

  • Identify exact crash location in sweep.py
  • Fix JSON serialization
  • Test with dry run
## Problem `scripts/sweep.py` crashes with `TypeError: Object of type StageConfig is not JSON serializable` when trying to save results. This prevents Stage 2 from ever running. ## Impact - Stage 1 completes (12 trials) but Stage 2 never starts - Results cannot be persisted properly for comparison ## Fix Needed Add a custom JSON encoder or convert StageConfig to dict before serialization. ## Status - [ ] Identify exact crash location in sweep.py - [ ] Fix JSON serialization - [ ] Test with dry run
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/ternary#5
No description provided.