Skip to content

Commit 406923b

Browse files
authored
ci: Fix integration test by avoid writing to read-only test directory (#675)
ci: Fix integration test by copying test dataset to writable directory In the AWS infra, our test directory is not writable. HF datasets unfortunately will always attempt to write a lock file even if the test data exists in the directory. This avoids that by copying the test datasets to a writable temp directory on the container. In other repos, sometimes mock the datasets.builder.FileLock object to also fix this problem. But it seems that the eval integration tests are called in a different process. So, it's not feasible to mock that object during the test. Fortunately, the test dataset is easy to copy over. Successful run: https://github.com/NVIDIA-NeMo/Evaluator/actions/runs/21506727996/job/61964385541 --------- Signed-off-by: Charlie Truong <chtruong@nvidia.com>
1 parent fda57e0 commit 406923b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/integration_tests/Launch_Integration_Tests.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ export CUDA_VISIBLE_DEVICES="0"
1717
export HF_HOME="/home/TestData/HF_HOME"
1818
export HF_DATASETS_OFFLINE="1"
1919
export TRANSFORMERS_OFFLINE="1"
20-
export HF_DATASETS_CACHE="${HF_HOME}/datasets"
20+
export HF_DATASETS_CACHE="/tmp/datasets"
2121

22+
mkdir /tmp/datasets
23+
cp -r ${HF_HOME}/datasets/gsm8k /tmp/datasets
24+
cp -r ${HF_HOME}/datasets/google___if_eval /tmp/datasets
25+
ls -alh /tmp/datasets
2226
mkdir -p /checkpoints && \
2327
ln -s /home/TestData/nemo2_ckpt/llama-3_2-1b-instruct_v2.0 /checkpoints/llama-3_2-1b-instruct_v2.0
2428

@@ -34,4 +38,4 @@ coverage run \
3438
-o log_cli_level=INFO \
3539
-m "not pleasefixme" \
3640
tests/integration_tests
37-
coverage combine -q
41+
coverage combine -q

0 commit comments

Comments
 (0)