Skip to content

Commit 0c6d6cb

Browse files
committed
fix version check test
Signed-off-by: sirutBuasai <sirutbuasai27@outlook.com>
1 parent 1c2208a commit 0c6d6cb

3 files changed

Lines changed: 4 additions & 102 deletions

File tree

.github/workflows/pytorch.tests-unit.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,6 @@ jobs:
4949
aws-region: ${{ vars.AWS_REGION }}
5050
image-uri: ${{ steps.image.outputs.image-uri }}
5151

52-
- name: Parse config
53-
if: steps.check.outputs.exists == 'true'
54-
id: config
55-
run: |
56-
CONFIG_FILE="${{ inputs.config-file }}"
57-
FRAMEWORK_VERSION=$(yq '.metadata.framework_version' "$CONFIG_FILE")
58-
echo "pytorch-version=$(echo "$FRAMEWORK_VERSION" | cut -d. -f1,2)" >> $GITHUB_OUTPUT
59-
6052
- name: Run unit tests
6153
if: steps.check.outputs.exists == 'true'
6254
run: |
@@ -67,8 +59,7 @@ jobs:
6759
docker exec ${CONTAINER_ID} pip install -r /workdir/test/requirements.txt -q
6860
docker exec -e PYTHONPATH=/workdir/test ${CONTAINER_ID} \
6961
pytest /workdir/test/pytorch/unit/ \
70-
--pytorch-version ${{ steps.config.outputs.pytorch-version }} \
71-
--workdir /workdir -v
62+
--config-file /workdir/${{ inputs.config-file }} -v
7263
docker kill ${CONTAINER_ID}
7364
7465
- name: Skip notice

test/pytorch/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
def pytest_addoption(parser):
1010
parser.addoption(
11-
"--pytorch-version",
12-
required=True,
13-
help="Short PyTorch version for locating version pins (e.g., '2.11')",
11+
"--config-file",
12+
default="",
13+
help="Path to image config YAML (e.g., '.github/config/image/pytorch/2.11-ec2-cpu.yml')",
1414
)
1515
parser.addoption(
1616
"--workdir",

test/pytorch/unit/test_versions.py

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)