Skip to content

Commit 3ae2235

Browse files
authored
Add validations to torchao #1 (#452)
1 parent 6486a33 commit 3ae2235

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/scripts/validate_binaries.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pip install ${PYTORCH_PIP_PREFIX} torchao --index-url ${PYTORCH_PIP_DOWNLOAD_URL}
2+
python ./test/smoke_tests/smoke_tests.py
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Validate binaries
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
channel:
7+
description: "Channel to use (nightly, test, release, all)"
8+
required: false
9+
type: string
10+
default: release
11+
ref:
12+
description: "Reference to checkout, defaults to empty"
13+
default: ""
14+
required: false
15+
type: string
16+
workflow_dispatch:
17+
inputs:
18+
channel:
19+
description: "Channel to use (nightly, test, release, all)"
20+
required: true
21+
type: choice
22+
options:
23+
- release
24+
- nightly
25+
- test
26+
- all
27+
ref:
28+
description: "Reference to checkout, defaults to empty"
29+
default: ""
30+
required: false
31+
type: string
32+
pytorch_version:
33+
description: "PyTorch version to validate (ie. 2.0, 2.2.2, etc.) - optional"
34+
default: ""
35+
required: false
36+
type: string
37+
jobs:
38+
validate-binaries:
39+
uses: pytorch/test-infra/.github/workflows/validate-domain-library.yml@main
40+
with:
41+
package_type: "wheel"
42+
version: ${{ inputs.version }}
43+
os: "linux"
44+
channel: ${{ inputs.channel }}
45+
repository: "pytorch/ao"
46+
smoke_test: "source ./.github/scripts/validate_binaries.sh"
47+
install_torch: true

test/smoke_tests/smoke_tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Run smoke tests"""
2+
3+
import torchao
4+
5+
6+
print("torchao version is ", torchao.__version__)

0 commit comments

Comments
 (0)