Skip to content

ci: Add nightly integration and distributed tests - #210

Open
siddharth07-code wants to merge 8 commits into
pytorch-ignite:mainfrom
siddharth07-code:feat/nightly-tests
Open

siddharth07-code wants to merge 8 commits into
pytorch-ignite:mainfrom
siddharth07-code:feat/nightly-tests

Conversation

@siddharth07-code

Copy link
Copy Markdown
Contributor

Description

Moves expensive integration and distributed tests to a dedicated nightly workflow while keeping regular PR CI fast.

Changes

  • Add a distributed pytest marker and exclude it from default test runs
  • Move integration tests from push/PR triggers to a nightly workflow
  • Add a dedicated Ubuntu job for distributed tests
  • Add timeout handling for the multi-process distributed test
  • Keep model parity tests unchanged in regular CI
  • Support manual execution with workflow_dispatch

Testing

  • 258 passed, 5 deselected — default test suite
  • 1 passed — integration test
  • 41 passed, 1 deselected — decoder trainer tests
  • All pre-commit hooks pass, including Ruff and Pyrefly

Closes #207

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

👷 Deploy request for trainite pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5c84c16

@TahaZahid05 TahaZahid05 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left comments. Also, can you check if the existing tests already test distributed and also integration i.e generating all possible combination of experiments and verify that they are training correctly.

Comment thread .github/workflows/nightly-tests.yml Outdated
Comment on lines +9 to +11
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @TahaZahid05 , I added it to avoid overlapping runs and save CI resources, but since the workflow only runs once a day, I don’t think it’s really necessary. I’ll remove it from the .yml .

Comment thread .github/workflows/nightly-tests.yml Outdated
on:
schedule:
# Run every night at 02:00 UTC
- cron: "0 2 * * *"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why not just do 0:00 utc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No particular reason for choosing 02:00 UTC. I’ll surely change it to 00:00 UTC.

Comment thread .github/workflows/nightly-tests.yml Outdated
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we test 3.12 and 3.13 as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that makes sense. I’ll check compatibility with both versions and add them to the matrix if everything works!

@siddharth07-code

Copy link
Copy Markdown
Contributor Author

Sure @TahaZahid05 ,I’ll go through the existing tests and check which experiment combinations are already covered and whether they’re actually testing successful training. I’ll add coverage for anything important that’s missing.

@siddharth07-code

Copy link
Copy Markdown
Contributor Author

Hi @TahaZahid05, I have pushed the updates addressing your feedback.

I removed concurrency, changed the schedule to 0:00 UTC, added Python 3.12/3.13 coverage, and expanded the integration tests to eight model/dataset combinations. I also added two distributed training regressions.

All local tests and checks are passing. The distributed tests still need native Linux validation, along with the Windows smoke test.
Could you please take another look at the PR whenever you get a chance? I would appreciate any further feedback.

Thanks again for your help!

Comment thread tests/trainers/decoder_trainer_test.py Outdated
Comment on lines +823 to +824
"--standalone",
"--rdzv-endpoint=localhost:0",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@siddharth07-code why we need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @vfdev-5 ,I added it to avoid potential port conflicts during distributed tests by letting the OS pick an available port. I thought this would make the tests a bit more reliable in CI, especially when multiple jobs are running.
I will double-check whether it’s actually needed alongside —standalone and update the PR accordingly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out, @vfdev-5 ! I confirmed that --standalone already configures the rendezvous endpoint automatically, so the explicit argument was redundant. I've removed it from both test invocations and updated the PR accordingly.

@TahaZahid05 TahaZahid05 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The PR currently isn't in good shape. Please improve it by not making unnecessary files. Additionally, distributed only needs to be tested in the sense that our code works fine with distributed config. We dont need to test Accelerate itself since that is not the concern of Trainite.

Comment thread tests/generated_project_config_test.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why add so many new files? It makes the codebase a mess. Why is a new file required?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We dont need to test if Accelerate works or not since that is not our concern. We only need to validate that our code is running with a distributed configuration and validate that it is training properly i.e monitoring loss.

@siddharth07-code

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, @TahaZahid05! I see what you mean. I went a bit overboard with the additional tests, and I agree we should focus on verifying Trainite’s behavior rather than testing Accelerate itself.

I’ll clean up the unnecessary files, simplify the tests, and make sure the distributed tests actually verify training progress and loss values. I’ll go through all your comments carefully, rerun the checks, and push an updated version that addresses these concerns.

@siddharth07-code

Copy link
Copy Markdown
Contributor Author

Hi @TahaZahid05, I have pushed the updates based on your feedback. I removed the three redundant test files, consolidated the relevant coverage into existing tests, and simplified the distributed checks to focus on Trainite's training progress and loss values.

Thanks for the suggestions! Would appreciate another look when you get a chance.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding Nightly tests

3 participants