Skip to content
Merged
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
40 changes: 35 additions & 5 deletions .github/workflows/cpu-torch-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ on:
default: 'main'
type: string
pull_request:
paths-ignore:
- 'docs/**'
- 'blogs/**'
- 'deepspeed/inference/v2/**'
- 'tests/unit/inference/v2/**'
merge_group:
branches: [ master ]
schedule:
Expand All @@ -47,8 +42,39 @@ concurrency:
cancel-in-progress: true

jobs:
check-paths:
name: cpu-torch-latest / check paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.non_pr.outputs.should_run || steps.filter.outputs.run_tests }}
steps:
- id: non_pr
if: github.event_name != 'pull_request'
run: echo "should_run=true" >> "$GITHUB_OUTPUT"

- uses: actions/checkout@v4
if: github.event_name == 'pull_request'

- uses: dorny/paths-filter@v3
id: filter
if: github.event_name == 'pull_request'
with:
predicate-quantifier: every
filters: |
run_tests:
- '**'
- '!docs/**'
- '!blogs/**'
- '!deepspeed/inference/v2/**'
- '!tests/unit/inference/v2/**'

unit-tests:
name: cpu-torch-latest / unit tests
needs: check-paths
if: always() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true')
runs-on: ubuntu-24.04

env:
Expand All @@ -58,6 +84,10 @@ jobs:
DEFAULT_TRANSFORMERS_REF: 'main'

steps:
- name: Fail if path filter failed
if: needs.check-paths.result != 'success'
run: exit 1

- uses: actions/checkout@v4

- id: setup-venv
Expand Down
35 changes: 20 additions & 15 deletions .github/workflows/modal-torch-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ on:
- master

pull_request_target:
paths-ignore:
- 'docs/**'
- 'blogs/**'
- 'deepspeed/inference/v2/**'
- 'tests/unit/inference/v2/**'
types: [review_requested, ready_for_review, synchronize]
branches:
- master
Expand All @@ -68,7 +63,7 @@ jobs:
contents: read
pull-requests: read
outputs:
deepspeed: ${{ steps.filter.outputs.deepspeed }}
deepspeed: ${{ steps.filter.outputs.deepspeed == 'true' || steps.filter.outputs.modal_workflow == 'true' || steps.filter.outputs.ci == 'true' || steps.filter.outputs.unit_tests == 'true' || steps.filter.outputs.csrc == 'true' }}

steps:
- name: Checkout repository
Expand All @@ -81,29 +76,32 @@ jobs:
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
predicate-quantifier: every
filters: |
deepspeed:
- 'deepspeed/**'
- '!deepspeed/inference/v2/**'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve push coverage for inference-v2 changes

The new !deepspeed/inference/v2/** exclusion is applied inside collect-tests, which runs for push as well as pull_request_target; this changes behavior beyond the stated PR-only paths-ignore migration. Before this commit, the inference-v2 ignore was only on pull_request_target, so pushes to master touching deepspeed/inference/v2/** still exercised Modal CI, but now those pushes can skip deploy entirely when no other watched path changes, reducing post-merge test coverage for that code path.

Useful? React with 👍 / 👎.

modal_workflow:
- '.github/workflows/modal*.yml'
ci:
- 'ci/**'
unit_tests:
- 'tests/unit/**'
- '!tests/unit/inference/v2/**'
csrc:
- 'csrc/**'

deploy:
name: modal-torch-latest / DeepSpeedAI CI
runs-on: ubuntu-latest
needs: collect-tests
env:
# these are created at https://modal.com/settings/deepspeedai/tokens
# they are then added to the repo's secrets at https://github.com/deepspeedai/deepspeed/settings/secrets/actions
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
# this one comes from https://huggingface.co/settings/profile of the bot user
# and it too is then updated at https://github.com/deepspeedai/deepspeed/settings/secrets/actions
HF_TOKEN: ${{ secrets.HF_TOKEN }}

if: github.event_name == 'workflow_dispatch' || needs.collect-tests.outputs.deepspeed == 'true'
if: always() && (github.event_name == 'workflow_dispatch' || needs.collect-tests.result != 'success' || needs.collect-tests.outputs.deepspeed == 'true')
steps:
- name: Fail if path filter failed
if: github.event_name != 'workflow_dispatch' && needs.collect-tests.result != 'success'
run: exit 1

- name: Checkout Repository
uses: actions/checkout@v4
with:
Expand All @@ -125,5 +123,12 @@ jobs:
MODAL_TORCH_PRESET: ${{ github.event.inputs.torch_preset || '2.10.0-cuda12.8' }}
MODAL_TRANSFORMERS_SOURCE: ${{ github.event.inputs.transformers_source || 'git' }}
MODAL_TRANSFORMERS_REF: ${{ github.event.inputs.transformers_ref || 'main' }}
# these are created at https://modal.com/settings/deepspeedai/tokens
# they are then added to the repo's secrets at https://github.com/deepspeedai/deepspeed/settings/secrets/actions
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}
# this one comes from https://huggingface.co/settings/profile of the bot user
# and it too is then updated at https://github.com/deepspeedai/deepspeed/settings/secrets/actions
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
modal run -m ci.torch_latest
40 changes: 35 additions & 5 deletions .github/workflows/nv-pre-compile-ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ on:
pull_request:
branches:
'**'
paths-ignore:
- 'docs/**'
- 'blogs/**'
- 'deepspeed/inference/v2/**'
- 'tests/unit/inference/v2/**'
merge_group:
branches: [ master ]
schedule:
Expand All @@ -20,13 +15,48 @@ concurrency:
cancel-in-progress: true

jobs:
check-paths:
name: nv-pre-compile-ops / check paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.non_pr.outputs.should_run || steps.filter.outputs.run_tests }}
steps:
- id: non_pr
if: github.event_name != 'pull_request'
run: echo "should_run=true" >> "$GITHUB_OUTPUT"

- uses: actions/checkout@v4
if: github.event_name == 'pull_request'

- uses: dorny/paths-filter@v3
id: filter
if: github.event_name == 'pull_request'
with:
predicate-quantifier: every
filters: |
run_tests:
- '**'
- '!docs/**'
- '!blogs/**'
- '!deepspeed/inference/v2/**'
- '!tests/unit/inference/v2/**'

unit-tests:
name: nv-pre-compile-ops / precompile ops
needs: check-paths
if: always() && (needs.check-paths.result != 'success' || needs.check-paths.outputs.should_run == 'true')
runs-on: ubuntu-24.04
container:
image: nvidia/cuda:12.6.3-devel-ubuntu22.04

steps:
- name: Fail if path filter failed
if: needs.check-paths.result != 'success'
run: exit 1

- name: Install system dependencies
run: |
apt-get update && apt-get install -y git python3 python3-pip libaio-dev ninja-build
Expand Down
46 changes: 43 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
pull_request:
branches:
'**'
paths-ignore:
- 'docs/**'
- 'blogs/**'
merge_group:
branches: [ master ]
schedule:
Expand All @@ -18,8 +15,37 @@ concurrency:
cancel-in-progress: true

jobs:
check-paths:
name: python / check paths
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.non_pr.outputs.should_run || steps.filter.outputs.run_tests }}
steps:
- id: non_pr
if: github.event_name != 'pull_request'
run: echo "should_run=true" >> "$GITHUB_OUTPUT"

- uses: actions/checkout@v4
if: github.event_name == 'pull_request'

- uses: dorny/paths-filter@v3
id: filter
if: github.event_name == 'pull_request'
with:
predicate-quantifier: every
filters: |
run_tests:
- '**'
- '!docs/**'
- '!blogs/**'

unit-tests:
name: python / install smoke (Python ${{ matrix.pyVersion }})
needs: check-paths
if: always()
strategy:
matrix:
pyVersion: ["3.10", "3.11", "3.12"]
Expand All @@ -30,21 +56,35 @@ jobs:
image: python:${{ matrix.pyVersion }}-slim

steps:
- name: Fail if path filter failed
if: needs.check-paths.result != 'success'
run: exit 1

- name: Skip ignored-path install smoke
if: needs.check-paths.outputs.should_run != 'true'
run: echo "Only ignored paths changed; install smoke intentionally skipped."

- uses: actions/checkout@v4
if: needs.check-paths.outputs.should_run == 'true'

- name: Install build dependencies
if: needs.check-paths.outputs.should_run == 'true'
run: |
apt-get update && apt-get install -y build-essential ninja-build
- name: environment
if: needs.check-paths.outputs.should_run == 'true'
run: |
which python
python --version
- name: Install PyTorch (CPU)
if: needs.check-paths.outputs.should_run == 'true'
run: |
pip install torch --index-url https://download.pytorch.org/whl/cpu
- name: Install deepspeed
if: needs.check-paths.outputs.should_run == 'true'
run: |
pip install .
- name: DS Report
if: needs.check-paths.outputs.should_run == 'true'
run: |
ds_report
Loading