Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 24 additions & 21 deletions .buildkite/gpu-tests/gpu-tests-H100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,30 @@ steps:
chmod +x .buildkite/gpu-tests/scripts/combine-coverage.sh
.buildkite/gpu-tests/scripts/combine-coverage.sh

- label: ":mag: Detect changes for Transformers Tests"
# Transformers tests - run on main and release branch pushes
- label: ":mag: Transformers Tests (branch)"
if: build.pull_request.id == null && (build.branch == "main" || build.branch =~ /^release-/)
agents:
queue: RedHat-ModelOpt-Util
command: |
if [ "$${BUILDKITE_PULL_REQUEST}" = "false" ]; then
echo "Push to branch — uploading transformers tests"
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-H100.yml
else
git fetch --unshallow 2>/dev/null || true
git fetch origin "$${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
DIFF_FILES=$$(git diff --name-only "origin/$${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD")
CHANGED=$$(echo "$${DIFF_FILES}" \
| grep -E '^(src/|tests/|setup\.py$$|MANIFEST\.in$$|\.buildkite/gpu-tests/transformers-tests-|\.buildkite/gpu-tests/scripts/run-tests\.sh$$)' \
| grep -vE '^tests/(e2e|lmeval|examples)/' \
| grep -vE '\.md$$' \
|| true)
if [ -n "$${CHANGED}" ]; then
echo "Relevant changes detected:"
echo "$${CHANGED}"
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-H100.yml
else
echo "No relevant changes — skipping transformers tests"
fi
fi
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-H100.yml

# Transformers tests - conditional on PRs when relevant paths changed
- label: ":mag: Transformers Tests (PR)"
if: build.pull_request.id != null
agents:
queue: RedHat-ModelOpt-Util
if_changed:
include:
- "src/**"
- "tests/**"
- "setup.py"
- "MANIFEST.in"
Comment on lines +105 to +106

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the project uses pyproject.toml for dependency management or project configuration, changes to it should also trigger the transformers tests to ensure that dependency updates or configuration changes do not break the tests.

        - "setup.py"
        - "pyproject.toml"
        - "MANIFEST.in"

- ".buildkite/gpu-tests/**"
exclude:
- "tests/e2e/**"
- "tests/lmeval/**"
- "tests/examples/**"
- "**/*.md"
command: |
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-H100.yml
45 changes: 24 additions & 21 deletions .buildkite/gpu-tests/gpu-tests-L4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,30 @@ steps:
chmod +x .buildkite/gpu-tests/scripts/combine-coverage.sh
.buildkite/gpu-tests/scripts/combine-coverage.sh

- label: ":mag: Detect changes for Transformers Tests"
# Transformers tests - run on main and release branch pushes
- label: ":mag: Transformers Tests (branch)"
if: build.pull_request.id == null && (build.branch == "main" || build.branch =~ /^release-/)
agents:
queue: RedHat-ModelOpt-Util
command: |
if [ "$${BUILDKITE_PULL_REQUEST}" = "false" ]; then
echo "Push to branch — uploading transformers tests"
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-L4.yml
else
git fetch --unshallow 2>/dev/null || true
git fetch origin "$${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
DIFF_FILES=$$(git diff --name-only "origin/$${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD")
CHANGED=$$(echo "$${DIFF_FILES}" \
| grep -E '^(src/|tests/|setup\.py$$|MANIFEST\.in$$|\.buildkite/gpu-tests/transformers-tests-|\.buildkite/gpu-tests/scripts/run-tests\.sh$$)' \
| grep -vE '^tests/(e2e|lmeval|examples)/' \
| grep -vE '\.md$$' \
|| true)
if [ -n "$${CHANGED}" ]; then
echo "Relevant changes detected:"
echo "$${CHANGED}"
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-L4.yml
else
echo "No relevant changes — skipping transformers tests"
fi
fi
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-L4.yml

# Transformers tests - conditional on PRs when relevant paths changed
- label: ":mag: Transformers Tests (PR)"
if: build.pull_request.id != null
agents:
queue: RedHat-ModelOpt-Util
if_changed:
include:
- "src/**"
- "tests/**"
- "setup.py"
- "MANIFEST.in"
Comment on lines +94 to +95

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the project uses pyproject.toml for dependency management or project configuration, changes to it should also trigger the transformers tests to ensure that dependency updates or configuration changes do not break the tests.

        - "setup.py"
        - "pyproject.toml"
        - "MANIFEST.in"

- ".buildkite/gpu-tests/**"
exclude:
- "tests/e2e/**"
- "tests/lmeval/**"
- "tests/examples/**"
- "**/*.md"
command: |
buildkite-agent pipeline upload .buildkite/gpu-tests/transformers-tests-L4.yml
1 change: 1 addition & 0 deletions .buildkite/gpu-tests/scripts/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

# Test change: This should trigger transformers tests
TEST_TYPE="${1:?Usage: run-tests.sh <base|transformers>}"

echo "~~~ System info"
Expand Down
Loading