#1413·gpt-neox

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)

yaml
- 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 tests

Suggested order (aligned with cpu_ci.yml)

yaml
- 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 tests

Test plan

  • Reorder the run-tests steps so all installs complete before prepare_data.py
  • Manually dispatch the Pull Request workflow (workflow_dispatch) and confirm the prepare-data / test steps succeed