-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
235 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
name: periodic | ||
|
||
on: | ||
schedule: | ||
- cron: '0,6,12,18 0 * * *' # Runs at midnight UTC and every 6 hours | ||
push: | ||
tags: | ||
- ciflow/periodic/* | ||
|
||
jobs: | ||
gather-models-linux: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
models: ${{ steps.gather-models-linux.outputs.models }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'false' | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Extract models to test on Linux | ||
id: gather-models-linux | ||
run: | | ||
set -eux | ||
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "periodic" | ||
gather-models-macos: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
models: ${{ steps.gather-models-macos.outputs.models }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'false' | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Extract models to test on macOS | ||
id: gather-models-macos | ||
run: | | ||
set -eux | ||
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "periodic" --target-os "macos" | ||
test-cpu-linux: | ||
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | ||
name: test-cpu-linux (${{ matrix.processor }}, ${{ matrix.repo_name }}) | ||
needs: gather-models-linux | ||
strategy: | ||
matrix: ${{ fromJSON(needs.gather-models-linux.outputs.models) }} | ||
fail-fast: false | ||
with: | ||
runner: ${{ matrix.runner }} | ||
timeout: 90 | ||
script: | | ||
echo "::group::Print machine info" | ||
uname -a | ||
echo "::endgroup::" | ||
echo "::group::Install required packages" | ||
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | ||
pip install -r ./requirements.txt | ||
export TORCHAT_ROOT=${PWD} | ||
bash ./scripts/install_et.sh true | ||
pip list | ||
echo "::endgroup::" | ||
echo "::group::Download checkpoint" | ||
export REPO_NAME=${{ matrix.repo_name }} | ||
bash .ci/scripts/wget_checkpoint.sh ${REPO_NAME} ${{ matrix.resources }} | ||
echo "::endgroup::" | ||
echo "::group::Convert checkpoint" | ||
export CHECKPOINT_PATH=./checkpoints/${REPO_NAME}/model.pth | ||
bash .ci/scripts/convert_checkpoint.sh ${REPO_NAME} | ||
echo "::endgroup::" | ||
echo "::group::Run inference" | ||
bash .ci/scripts/validate.sh ${CHECKPOINT_PATH} | ||
echo "::endgroup::" | ||
test-cpu-macos: | ||
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main | ||
name: test-cpu-macos (${{ matrix.processor }}, ${{ matrix.repo_name }}) | ||
needs: gather-models-macos | ||
strategy: | ||
matrix: ${{ fromJSON(needs.gather-models-macos.outputs.models) }} | ||
fail-fast: false | ||
with: | ||
runner: ${{ matrix.runner }} | ||
timeout: 90 | ||
script: | | ||
echo "::group::Print machine info" | ||
uname -a | ||
if [ $(uname -s) == Darwin ]; then | ||
sysctl machdep.cpu.brand_string | ||
sysctl machdep.cpu.core_count | ||
fi | ||
echo "::endgroup::" | ||
echo "::group::Install required packages" | ||
conda install -y wget | ||
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | ||
pip install -r ./requirements.txt | ||
export TORCHAT_ROOT=${PWD} | ||
bash ./scripts/install_et.sh true | ||
pip list | ||
echo "::endgroup::" | ||
echo "::group::Download checkpoint" | ||
export REPO_NAME=${{ matrix.repo_name }} | ||
bash .ci/scripts/wget_checkpoint.sh ${REPO_NAME} ${{ matrix.resources }} | ||
echo "::endgroup::" | ||
echo "::group::Convert checkpoint" | ||
export CHECKPOINT_PATH=./checkpoints/${REPO_NAME}/model.pth | ||
bash .ci/scripts/convert_checkpoint.sh ${REPO_NAME} | ||
echo "::endgroup::" | ||
echo "::group::Run inference" | ||
bash .ci/scripts/validate.sh ${CHECKPOINT_PATH} | ||
echo "::endgroup::" | ||
test-cuda: | ||
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | ||
name: test-cuda (linux, ${{ matrix.repo_name }}) | ||
needs: gather-models-linux | ||
strategy: | ||
matrix: ${{ fromJSON(needs.gather-models-linux.outputs.models) }} | ||
fail-fast: false | ||
with: | ||
runner: linux.g5.4xlarge.nvidia.gpu | ||
gpu-arch-type: cuda | ||
gpu-arch-version: "12.1" | ||
script: | | ||
echo "::group::Print machine info" | ||
nvidia-smi | ||
echo "::endgroup::" | ||
echo "::group::Install required packages" | ||
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121 | ||
pip install -r ./requirements.txt | ||
pip list | ||
echo "::endgroup::" | ||
echo "::group::Download checkpoint" | ||
export REPO_NAME=${{ matrix.repo_name }} | ||
bash .ci/scripts/wget_checkpoint.sh ${REPO_NAME} ${{ matrix.resources }} | ||
echo "::endgroup::" | ||
echo "::group::Convert checkpoint" | ||
export CHECKPOINT_PATH=./checkpoints/${REPO_NAME}/model.pth | ||
bash .ci/scripts/convert_checkpoint.sh ${REPO_NAME} | ||
echo "::endgroup::" | ||
echo "::group::Run inference" | ||
bash .ci/scripts/validate.sh ${CHECKPOINT_PATH} cuda | ||
echo "::endgroup::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters