Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions experiments/BERT.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

base_path = os.environ.get('TORCHSIM_DIR', default='/workspace/PyTorchSim')
sys.path.insert(0, base_path)
sys.path.insert(0, os.path.join(base_path, 'tests'))

import torch
from Simulator.simulator import TOGSimulator
Expand All @@ -13,9 +14,9 @@

# Try Fusion EncoderBlock first, fall back to standard test_transformer
try:
from tests.Fusion.test_transformer_fusion import EncoderBlock
from ops.fusion.test_transformer_fusion import EncoderBlock
except ImportError:
from tests.test_transformer import EncoderBlock
from models.test_transformer import EncoderBlock

HIDDEN_DIM = {'base': 768, 'large': 1024, 'xlarge': 2048}
EMBEDDING_SIZE = {'base': 768, 'large': 1024, 'xlarge': 2048}
Expand Down
5 changes: 4 additions & 1 deletion experiments/artifact/cycle_validation/run_cycle.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
set -e
# pipefail so a failing "python3 ... | tee log" aborts instead of being masked by
# tee's exit code (otherwise a broken model -- e.g. BERT -- fails silently and the
# job stays green).
set -eo pipefail

usage() {
cat <<'EOF'
Expand Down
Loading