CI: run-tests prepares data before installing Python dependencies
Author: MGPOCKYCreated Aug 3, 2026Updated Aug 3, 2026
Summary
In .github/workflows/pull_request.yml, the run-tests job runs python3 prepare_data.py before any pip install step. prepare_data.py eventually invokes tools/datasets/preprocess_data.py, which imports third-party packages (torch, numpy, tqdm, ftfy, lm_dataformat, …), so this step can fail on a clean runner.
The same repository’s cpu_ci.yml already does this in the correct order (install dependencies → prepare data → pytest).
Current (pull_request.yml / run-tests)
- name: prepare data
run: python3 prepare_data.py
- name: install pytest
run: python3 -m pip install pytest pytest-forked pyyaml requests wandb
- name: install torch
run: python3 -m pip install torch
- name: install requirements
run: pip install -r requirements/requirements.txt
- name: Run Tests
run: pytest --forked testsSuggested order (aligned with cpu_ci.yml)
- name: install pytest
run: python3 -m pip install pytest pytest-forked pyyaml requests wandb
- name: install torch
run: python3 -m pip install torch
- name: install requirements
run: pip install -r requirements/requirements.txt
- name: prepare data
run: python3 prepare_data.py
- name: Run Tests
run: pytest --forked testsTest plan
- Reorder the
run-testssteps so all installs complete beforeprepare_data.py - Manually dispatch the
Pull Requestworkflow (workflow_dispatch) and confirm the prepare-data / test steps succeed
Source: EleutherAI/gpt-neox