Skip to content

Commit 8782542

Browse files
mikekgfbJack-Khuu
andauthored
Update run-docs to include run-docs native (#1403)
* 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]>
1 parent aba0679 commit 8782542

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

.ci/scripts/run-docs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fi
9595
if [ "$1" == "multimodal" ]; then
9696

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

100100
echo "::group::Create script to run multimodal"
101101
python3 torchchat/utils/scripts/updown.py --file docs/multimodal.md > ./run-multimodal.sh
@@ -111,3 +111,20 @@ if [ "$1" == "multimodal" ]; then
111111
bash -x ./run-multimodal.sh
112112
echo "::endgroup::"
113113
fi
114+
115+
if [ "$1" == "native" ]; then
116+
117+
echo "::group::Create script to run native-execution"
118+
python3 torchchat/utils/scripts/updown.py --file docs/native-execution.md > ./run-native.sh
119+
# for good measure, if something happened to updown processor,
120+
# and it did not error out, fail with an exit 1
121+
echo "exit 1" >> ./run-native.sh
122+
echo "::endgroup::"
123+
124+
echo "::group::Run native-execution"
125+
echo "*******************************************"
126+
cat ./run-native.sh
127+
echo "*******************************************"
128+
bash -x ./run-native.sh
129+
echo "::endgroup::"
130+
fi

.github/workflows/run-readme-pr.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,46 @@ jobs:
287287
echo "::endgroup::"
288288
289289
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs multimodal
290+
291+
test-native-any:
292+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
293+
with:
294+
runner: linux.g5.4xlarge.nvidia.gpu
295+
gpu-arch-type: cuda
296+
gpu-arch-version: "12.1"
297+
timeout: 60
298+
script: |
299+
echo "::group::Print machine info"
300+
uname -a
301+
echo "::endgroup::"
302+
303+
echo "::group::Install newer objcopy that supports --set-section-alignment"
304+
yum install -y devtoolset-10-binutils
305+
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
306+
echo "::endgroup::"
307+
308+
.ci/scripts/run-docs native
309+
310+
echo "::group::Completion"
311+
echo "tests complete"
312+
echo "*******************************************"
313+
echo "::endgroup::"
314+
315+
test-native-cpu:
316+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
317+
with:
318+
runner: linux.g5.4xlarge.nvidia.gpu
319+
gpu-arch-type: cuda
320+
gpu-arch-version: "12.1"
321+
timeout: 60
322+
script: |
323+
echo "::group::Print machine info"
324+
uname -a
325+
echo "::endgroup::"
326+
327+
echo "::group::Install newer objcopy that supports --set-section-alignment"
328+
yum install -y devtoolset-10-binutils
329+
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
330+
echo "::endgroup::"
331+
332+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs native

0 commit comments

Comments
 (0)