Skip to content

[Feature]: AutoDeploy: restructure unit tests #11166

Description

@lucaslie

🚀 The feature, motivation and pitch

Currently, AD unit tests are run as a single test block in CI via unittest/_torch/auto_deploy/unit/singlegpu.

This is not ideal for CI for various reasons, see discussion with @chzblych:

Regarding point (a), the test granularity is controlled by our developers, who have the flexibility to split "unittest/_torch/auto_deploy/unit/singlegpu" into smaller groups such as "unittest/_torch/auto_deploy/unit/singlegpu/compile", "unittest/_torch/auto_deploy/unit/singlegpu/custom_ops", and others. It's a trade-off between finer test granularity and additional setup overhead. In general, I think we should avoid having one large, monolithic test entry.

For unit tests, we use a two-level Pytest execution model. The outer level corresponds to the test entry specified in the test-db YAML files (e.g., "unittest/_torch/auto_deploy/unit/singlegpu"), while the inner level represents the underlying individual unit tests. If any inner test fails, the corresponding outer test entry fails as well. Capturing both levels of test results is important for cross-run reuse and unit test parallel execution. In some cases, due to fatal errors, test results for one or both levels might not be generated.

The goal is to

  1. split up and register AD unit tests in smaller blocks of tests
  2. re-organize and restructure tests to be more intuitively organized
  3. Update AD dev guide with clearer instructions on AD test hierarchy (unit, integration, dashboard), see this discussion as well: https://docs.google.com/document/d/1aW1A2kjggc83-amEgRd5f3amLygszop3jlb7i5pzQak/edit?disco=AAAByqJInMg

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Activity

  1. added theissue type on Jan 31, 2026
  2. added
    feature request
    on Jan 31, 2026
  3. added
    AutoDeploy
    on Jan 31, 2026
  4. moved this from Ready to In progress in AutoDeploy Boardon Feb 4, 2026
  5. added a commit that references this issue on Feb 4, 2026
  6. moved this from In progress to In review in AutoDeploy Boardon Feb 4, 2026
  7. added a commit that references this issue on Feb 5, 2026
  8. added 7 commits that reference this issue on Mar 3, 2026
  9. added a commit that references this issue on Mar 8, 2026
  10. moved this from In review to Done in AutoDeploy Boardon Mar 8, 2026
  11. added a commit that references this issue on Mar 19, 2026
  12. added a commit that references this issue on Mar 19, 2026
  13. added a commit that references this issue on Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AutoDeployfeature request

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions