Skip to content

Commit 5077f0f

Browse files
committed
Update (base update)
[ghstack-poisoned]
1 parent 644e708 commit 5077f0f

File tree

26 files changed

+131
-1106
lines changed

26 files changed

+131
-1106
lines changed

.github/unittest/llm/scripts_llm/run_test.sh renamed to .github/unittest/linux_libs/scripts_llm/run_test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,14 @@ lib_dir="${env_dir}/lib"
2323

2424
conda deactivate && conda activate ./env
2525

26-
pytest test/llm -vvv --instafail --durations 600 --capture no --error-for-skips
26+
python -c "import transformers, datasets"
27+
28+
pytest test/test_rlhf.py --instafail -v --durations 200 --capture no --error-for-skips
29+
30+
python examples/rlhf/train_rlhf.py \
31+
sys.device=cuda:0 sys.ref_device=cuda:0 \
32+
model.name_or_path=gpt2 train.max_epochs=2 \
33+
data.batch_size=2 train.ppo.ppo_batch_size=2 \
34+
train.ppo.ppo_num_epochs=1 reward_model.name_or_path= \
35+
train.ppo.episode_length=8 train.ppo.num_rollouts_per_epoch=4 \
36+
data.block_size=110 io.logger=csv

.github/unittest/llm/scripts_llm/setup_env.sh renamed to .github/unittest/linux_libs/scripts_llm/setup_env.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@
66
# Do not install PyTorch and torchvision here, otherwise they also get cached.
77

88
set -e
9-
export DEBIAN_FRONTEND=noninteractive
10-
export TZ=UTC
11-
apt-get update
12-
apt-get install -yq --no-install-recommends git cmake
9+
apt-get update && apt-get upgrade -y && apt-get install -y git cmake
1310
# Avoid error: "fatal: unsafe repository"
1411
git config --global --add safe.directory '*'
15-
apt-get install -yq --no-install-recommends wget \
12+
apt-get install -y wget \
1613
gcc \
1714
g++ \
1815
unzip \
@@ -30,10 +27,7 @@ apt-get install -yq --no-install-recommends wget \
3027
libgles2
3128

3229
# Upgrade specific package
33-
apt-get install -yq --no-install-recommends --only-upgrade libstdc++6
34-
35-
apt-get clean
36-
rm -rf /var/lib/apt/lists/*
30+
apt-get upgrade -y libstdc++6
3731

3832
this_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
3933
root_dir="$(git rev-parse --show-toplevel)"

.github/workflows/test-linux-llm.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ permissions:
2121

2222
jobs:
2323
unittests:
24-
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && contains(join(github.event.pull_request.labels.*.name, ', '), 'llm/')) }}
2524
strategy:
2625
matrix:
2726
python_version: ["3.9"]
2827
cuda_arch_version: ["12.8"]
2928
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3029
with:
3130
repository: pytorch/rl
32-
runner: "linux.g6.4xlarge.experimental.nvidia.gpu"
31+
runner: "linux.g5.4xlarge.nvidia.gpu"
3332
# gpu-arch-type: cuda
3433
# gpu-arch-version: "11.7"
3534
docker-image: "nvidia/cudagl:11.4.0-base"
@@ -51,7 +50,7 @@ jobs:
5150
export TF_CPP_MIN_LOG_LEVEL=0
5251
export TD_GET_DEFAULTS_TO_NONE=1
5352
54-
bash .github/unittest/llm/scripts_llm/setup_env.sh
55-
bash .github/unittest/llm/scripts_llm/install.sh
56-
bash .github/unittest/llm/scripts_llm/run_test.sh
57-
bash .github/unittest/llm/scripts_llm/post_process.sh
53+
bash .github/unittest/linux_libs/scripts_llm/setup_env.sh
54+
bash .github/unittest/linux_libs/scripts_llm/install.sh
55+
bash .github/unittest/linux_libs/scripts_llm/run_test.sh
56+
bash .github/unittest/linux_libs/scripts_llm/post_process.sh

0 commit comments

Comments
 (0)