diff --git a/experiments/BERT.py b/experiments/BERT.py index 12e3cb33..ce59b7e8 100644 --- a/experiments/BERT.py +++ b/experiments/BERT.py @@ -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 @@ -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} diff --git a/experiments/artifact/cycle_validation/run_cycle.sh b/experiments/artifact/cycle_validation/run_cycle.sh index d6a501fd..1b7c434f 100755 --- a/experiments/artifact/cycle_validation/run_cycle.sh +++ b/experiments/artifact/cycle_validation/run_cycle.sh @@ -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'