From fe650dd3260d0c24d6c5366b90d3507773872b2c Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Wed, 29 May 2024 10:12:11 -0400 Subject: [PATCH] make sure the CI fails when pytest script fails (#1669) * make sure the pytest script fails * make sure the defaults come through for tests * make sure tensorboard is loaded for test assertion --- cicd/cicd.sh | 1 + src/axolotl/utils/samplers/multipack.py | 4 ++-- tests/e2e/patched/test_resume.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cicd/cicd.sh b/cicd/cicd.sh index fa2049b6b..bc36458ab 100755 --- a/cicd/cicd.sh +++ b/cicd/cicd.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e pytest --ignore=tests/e2e/ /workspace/axolotl/tests/ pytest /workspace/axolotl/tests/e2e/patched/ diff --git a/src/axolotl/utils/samplers/multipack.py b/src/axolotl/utils/samplers/multipack.py index 07fd05682..1d025ca2d 100644 --- a/src/axolotl/utils/samplers/multipack.py +++ b/src/axolotl/utils/samplers/multipack.py @@ -80,8 +80,8 @@ class MultipackBatchSampler(BatchSampler): self.lengths = np.array(lengths, dtype=np.int32) self.batch_max_len = batch_max_len self.batch_size = batch_size - self.group_size = group_size - self.bin_size = bin_size + self.group_size = group_size if group_size is not None else 100_000 + self.bin_size = bin_size if bin_size is not None else 200 self.drop_last = drop_last self._efficiency = None diff --git a/tests/e2e/patched/test_resume.py b/tests/e2e/patched/test_resume.py index dfe9e8625..c0e791f38 100644 --- a/tests/e2e/patched/test_resume.py +++ b/tests/e2e/patched/test_resume.py @@ -62,6 +62,7 @@ class TestResumeLlama(unittest.TestCase): "save_steps": 10, "save_total_limit": 5, "max_steps": 40, + "use_tensorboard": True, } ) if is_torch_bf16_gpu_available():