[Experiment] Fix BERT.py imports and fail-fast in run_cycle.sh - #263
Merged
Conversation
The tests/ reorg (tests -> tests/ops, tests/models) left experiments/BERT.py importing EncoderBlock from the old paths (tests.Fusion.test_transformer_fusion, tests.test_transformer), so every BERT size raised ModuleNotFoundError. Put tests/ on sys.path and import from the new locations (ops.fusion.test_transformer_fusion, models.test_transformer), matching how the test files import their siblings. run_cycle.sh ran each model as 'python3 ... | tee log' under 'set -e' only, so a model crash was masked by tee's exit code and the job stayed green with empty logs (this is why BERT failures went unnoticed). Add 'set -o pipefail' so a failing model aborts the run. Verified: BERT --size base now runs end to end (TOGSim, 329573 cycles). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent fixes surfaced while reviewing the test_accuracy CI job (unrelated to floor/mod work).
BERT.py imports broken by the tests/ reorg.
experiments/BERT.pystill importedEncoderBlockfromtests.Fusion.test_transformer_fusion/tests.test_transformer, which no longer exist (moved totests/ops/fusionandtests/models). Every BERT size raisedModuleNotFoundError. Fixed by puttingtests/on sys.path and importingops.fusion.test_transformer_fusion/models.test_transformer(same convention the test files use).run_cycle.sh masked failures. Each model ran as
python3 ... | tee logunderset -eonly, so a crash was hidden by tee's exit code -- the job stayed green with empty logs. This is why broken BERT went unnoticed. Addedset -o pipefailso a failing model aborts.Verified:
BERT.py --size basenow runs end to end (TOGSim, 329573 cycles).🤖 Generated with Claude Code