Skip to content

Commit b6cec6a

Browse files
guangy10malfet
authored andcommitted
Add torch and git version (#301)
1 parent 16544b1 commit b6cec6a

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

.github/workflows/et-gguf.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949

5050
echo "Executorch: installing python interface"
5151
./install_requirements.sh --pybind xnnpack
52+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
5253

5354
cd ../..
5455
echo "Inside: ${PWD}"
@@ -83,7 +84,7 @@ jobs:
8384
echo "Tests complete."
8485

8586
- name: Run inference
86-
run: |
87+
run: |
8788
export GGUF_PATH=ggufs/stories15M/stories15M.pt
8889
export MODEL_NAME=stories15M
8990
export MODEL_DIR=/tmp
@@ -128,4 +129,3 @@ jobs:
128129

129130
echo "tests complete"
130131
echo "******************************************"
131-

.github/workflows/periodic.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
5151
pip install -r requirements.txt
5252
pip list
53+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
5354
- name: Download checkpoints
5455
run: |
5556
bash ${TORCHCHAT_ROOT}/.ci/scripts/wget_checkpoint.sh ${{ matrix.repo_name }} "${{ matrix.resources }}"
@@ -83,6 +84,7 @@ jobs:
8384
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
8485
pip install -r requirements.txt
8586
pip list
87+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
8688
- name: Download checkpoints
8789
run: |
8890
bash ${TORCHCHAT_ROOT}/.ci/scripts/wget_checkpoint.sh ${{ matrix.repo_name }} "${{ matrix.resources }}"
@@ -127,6 +129,7 @@ jobs:
127129
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
128130
pip install -r ./requirements.txt
129131
pip list
132+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
130133
echo "::endgroup::"
131134
132135
echo "::group::Download checkpoint"

.github/workflows/pull.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ jobs:
4949
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
5050
pip install -r requirements.txt
5151
pip list
52+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
5253
- name: Download checkpoints
5354
run: |
5455
bash ${TORCHCHAT_ROOT}/.ci/scripts/wget_checkpoint.sh ${{ matrix.repo_name }} "${{ matrix.resources }}"
5556
- name: Run validation
5657
run: |
57-
python3 -c "import torch;print(torch.__version__, torch.version.git_version)"
58+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
5859
pushd ${TORCHCHAT_ROOT}
5960
bash .ci/scripts/convert_checkpoint.sh ${REPO_NAME}
6061
bash .ci/scripts/validate.sh "./checkpoints/${REPO_NAME}/model.pth" "cpu" "compile"
@@ -83,6 +84,7 @@ jobs:
8384
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
8485
pip install -r requirements.txt
8586
pip list
87+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
8688
- name: Download checkpoints
8789
run: |
8890
bash ${TORCHCHAT_ROOT}/.ci/scripts/wget_checkpoint.sh ${{ matrix.repo_name }} "${{ matrix.resources }}"
@@ -127,6 +129,7 @@ jobs:
127129
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
128130
pip install -r ./requirements.txt
129131
pip list
132+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
130133
echo "::endgroup::"
131134
132135
echo "::group::Download checkpoint"
@@ -161,6 +164,7 @@ jobs:
161164
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
162165
pip install -r ./requirements.txt
163166
pip list
167+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
164168
echo "::endgroup::"
165169
166170
echo "::group::Download checkpoint"
@@ -217,6 +221,10 @@ jobs:
217221
echo "Executorch: installing python interface"
218222
./install_requirements.sh --pybind xnnpack
219223
224+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
225+
python3 -c 'import torchvision;print(f"torchvision: {torchvision.__version__, torchvision.version.git_version}")'
226+
python3 -c 'import torchaudio;print(f"torchaudio: {torchaudio.__version__, torchaudio.version.git_version}")'
227+
220228
cd ../..
221229
echo "Inside: ${PWD}"
222230
- name: Download checkpoints
@@ -329,6 +337,7 @@ jobs:
329337
echo "Installing pip packages"
330338
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
331339
pip install -r requirements.txt
340+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
332341
333342
- name: Download Stories files
334343
run: |
@@ -375,6 +384,7 @@ jobs:
375384
run: |
376385
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
377386
pip install -r requirements.txt
387+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
378388
- name: Download checkpoints
379389
run: |
380390
mkdir -p checkpoints/stories15M
@@ -455,6 +465,7 @@ jobs:
455465
ls -la
456466
pwd
457467
pip install -r requirements.txt
468+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
458469
echo "::endgroup::"
459470
460471
echo "::group::Download checkpoints"
@@ -524,6 +535,7 @@ jobs:
524535
pip install gguf
525536
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
526537
pip install -r requirements.txt
538+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
527539
528540
git clone https://github.com/ggerganov/llama.cpp.git
529541
pushd llama.cpp
@@ -554,7 +566,7 @@ jobs:
554566
# NS: Remove previous installation of torch first
555567
# as this script does not isntall anything into conda env but rather as system dep
556568
pip uninstall -y torch || true
557-
569+
558570
set -eou pipefail
559571
560572
echo "::group::Print machine info"
@@ -569,6 +581,7 @@ jobs:
569581
ls -la
570582
pwd
571583
pip install -r requirements.txt
584+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
572585
echo "::endgroup::"
573586
574587
echo "::group::Download checkpoints"
@@ -632,6 +645,7 @@ jobs:
632645
pip install gguf
633646
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
634647
pip install -r requirements.txt
648+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
635649
- name: Download GGUF
636650
run: |
637651
mkdir gguf_files
@@ -712,6 +726,9 @@ jobs:
712726
export TORCHCHAT_ROOT=${PWD}
713727
export ENABLE_ET_PYBIND=false
714728
./scripts/install_et.sh $ENABLE_ET_PYBIND
729+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
730+
python3 -c 'import torchvision;print(f"torchvision: {torchvision.__version__, torchvision.version.git_version}")'
731+
python3 -c 'import torchaudio;print(f"torchaudio: {torchaudio.__version__, torchaudio.version.git_version}")'
715732
cmake -S ./runner-et -B et-build/cmake-out -G Ninja
716733
cmake --build ./et-build/cmake-out
717734
- name: Download checkpoints

0 commit comments

Comments
 (0)