8000 Refactor `torch/utils/data/datapipes/gen_pyi.py` with `torchgen` by XuehaiPan · Pull Request #150626 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Refactor torch/utils/data/datapipes/gen_pyi.py with torchgen #150626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 29 commits into from

Conversation

[ghstack-poisoned]
Copy link
pytorch-bot bot commented Apr 3, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150626

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit c715b4f with merge base cb5f31a (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
@XuehaiPan XuehaiPan changed the title Refactor torch/utils/data/datapipes with torchgen Refactor torch/utils/data/datapipes/gen_pyi.py with torchgen Apr 4, 2025
[ghstack-poisoned]
[ghstack-poisoned]
@XuehaiPan XuehaiPan added the suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) label Apr 4, 2025
@XuehaiPan
Copy link
Collaborator Author

The gen_pyi.py file is not intended to export anything. Suppress the BC linter.

XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Apr 4, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Apr 4, 2025
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Apr 5, 2025
[ghstack-poisoned]
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 10, 2025
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 11, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 14, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 14, 2025
except ImportError:
import sys

REPO_ROOT = _Path(__file__).absolute().parents[4]
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a quick comment saying when this is expected to occur?

XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 14, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 15, 2025
@XuehaiPan XuehaiPan requested a review from aorenste May 15, 2025 15:18
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 15, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 16, 2025
__all__: list[str] = [] # not intended to expose any symbols


def __dir__() -> list[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this appease the public API test? I'm surprised that the test treats a module with no actually visible members any different than one with and empty '__all__' defined... I wonder if there's a test bug there...

Copy link
Collaborator Author
@XuehaiPan XuehaiPan May 16, 2025

Choose a reason for hiding this comment

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

The public API test checks symbols in set(dir(mod)) - set(mod.__all__).

@XuehaiPan
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 16, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: linux-binary-manywheel / manywheel-py3_9-cuda12_6-test / test

Details for Dev Infra team Raised by workflow job

@XuehaiPan
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged open source suppress-bc-linter Suppresses the failures of API backward-compatibility linter (Lint/bc_linter) topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0