Skip to content

Commit

Permalink
Update run-docs to include run-docs native (#1403)
Browse files Browse the repository at this point in the history
* Update run-docs to include `run native`

run docs/native-execution.md commands during execution

* Update run-readme-pr.yml

Include `run-docs native` in workflow

---------

Co-authored-by: Jack-Khuu <[email protected]>
  • Loading branch information
mikekgfb and Jack-Khuu authored Dec 9, 2024
1 parent aba0679 commit 8782542
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .ci/scripts/run-docs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fi
if [ "$1" == "multimodal" ]; then

# Expecting that this might fail this test as-is, because
# it's the first on-pr test depending on githib secrets for access with HF token access
# it's the first on-pr test depending on github secrets for access with HF token access

echo "::group::Create script to run multimodal"
python3 torchchat/utils/scripts/updown.py --file docs/multimodal.md > ./run-multimodal.sh
Expand All @@ -111,3 +111,20 @@ if [ "$1" == "multimodal" ]; then
bash -x ./run-multimodal.sh
echo "::endgroup::"
fi

if [ "$1" == "native" ]; then

echo "::group::Create script to run native-execution"
python3 torchchat/utils/scripts/updown.py --file docs/native-execution.md > ./run-native.sh
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./run-native.sh
echo "::endgroup::"

echo "::group::Run native-execution"
echo "*******************************************"
cat ./run-native.sh
echo "*******************************************"
bash -x ./run-native.sh
echo "::endgroup::"
fi
43 changes: 43 additions & 0 deletions .github/workflows/run-readme-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,46 @@ jobs:
echo "::endgroup::"
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs multimodal
test-native-any:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "12.1"
timeout: 60
script: |
echo "::group::Print machine info"
uname -a
echo "::endgroup::"
echo "::group::Install newer objcopy that supports --set-section-alignment"
yum install -y devtoolset-10-binutils
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
echo "::endgroup::"
.ci/scripts/run-docs native
echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"
test-native-cpu:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "12.1"
timeout: 60
script: |
echo "::group::Print machine info"
uname -a
echo "::endgroup::"
echo "::group::Install newer objcopy that supports --set-section-alignment"
yum install -y devtoolset-10-binutils
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
echo "::endgroup::"
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs native

0 comments on commit 8782542

Please sign in to comment.