⚡ Bolt: parallelize unit test execution in gate script - #463
Conversation
- Parallelize test_sample loop using ThreadPoolExecutor in 03_unit_test_gate.py - Fix os.makedirs bug in save_jsonl utilities - Fix NameError: target_run_id in heidi_engine/telemetry.py
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request parallelizes unit test execution in scripts/03_unit_test_gate.py using a ThreadPoolExecutor to run tests concurrently while preserving their original order. It also updates save_jsonl to handle current-directory paths gracefully and removes an unused state cache check in heidi_engine/telemetry.py. Additionally, a documentation entry is added to .jules/bolt.md summarizing these optimization learnings. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
💡 What:
ThreadPoolExecutorinscripts/03_unit_test_gate.pyto parallelize the execution of generated code samples.save_jsonlthat causedFileNotFoundErrorwhen the output path was in the current directory.NameErrorinheidi_engine/telemetry.py:get_statethat was discovered during full test suite execution.🎯 Why:
subprocess.runfor each code sample was a significant bottleneck in the training pipeline, especially as the dataset size grows.os.makedirsbug prevented running scripts with output in the current directory.NameErrorin telemetry broke state retrieval on cache misses.📊 Impact:
🔬 Measurement:
python3 scripts/03_unit_test_gate.pywith a large JSONL input and observe the "Running with N parallel workers" log and reduced execution time.pytest tests/now passes (previously failing due toNameError).PR created automatically by Jules for task 1317338254387165136 started by @heidi-dang