Skip to content

[Experiment] Fix BERT.py imports and fail-fast in run_cycle.sh - #263

Merged
YWHyuk merged 1 commit into
developfrom
fix/bert-imports-cycle-failfast
Jun 18, 2026
Merged

[Experiment] Fix BERT.py imports and fail-fast in run_cycle.sh#263
YWHyuk merged 1 commit into
developfrom
fix/bert-imports-cycle-failfast

Conversation

@YWHyuk

@YWHyuk YWHyuk commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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.py still imported EncoderBlock from tests.Fusion.test_transformer_fusion / tests.test_transformer, which no longer exist (moved to tests/ops/fusion and tests/models). Every BERT size raised ModuleNotFoundError. Fixed by putting tests/ on sys.path and importing ops.fusion.test_transformer_fusion / models.test_transformer (same convention the test files use).

run_cycle.sh masked failures. Each model ran as python3 ... | tee log under set -e only, so a crash was hidden by tee's exit code -- the job stayed green with empty logs. This is why broken BERT went unnoticed. Added set -o pipefail so a failing model aborts.

Verified: BERT.py --size base now runs end to end (TOGSim, 329573 cycles).

🤖 Generated with Claude Code

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>
@YWHyuk
YWHyuk merged commit 0068ac6 into develop Jun 18, 2026
2 checks passed
@YWHyuk
YWHyuk deleted the fix/bert-imports-cycle-failfast branch July 8, 2026 06:53
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.

1 participant