Skip to content
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

[DataPipe] Fixing map function signature validation #84279

Closed
wants to merge 3 commits into from

Conversation

NivekT
Copy link
Contributor

@NivekT NivekT commented Aug 30, 2022

Stack from ghstack (oldest at bottom):

As @pmeier points out, #80267 introduces a bug where an exception is thrown when a built-in function (or a function implemented in C) is used with .map because inspect.signature(fn) cannot find the function's signature.

This PR skips over a function when its signature cannot be found. I believe this case is rare, and if the fn is truly incompatible with the usage of input_col/output_col, an exception will be raised at run time such that users will be able to examine what is wrong.

@pytorch-bot pytorch-bot bot added the release notes: dataloader release notes category label Aug 30, 2022
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 30, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 161eca9 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

NivekT added a commit that referenced this pull request Aug 30, 2022
ghstack-source-id: 5742ef47c4293862545fe852233315a224e8814e
Pull Request resolved: #84279
@NivekT NivekT added the topic: bug fixes topic category label Aug 30, 2022
@NivekT NivekT requested review from VitalyFedyunin, ejguan and pmeier and removed request for VitalyFedyunin and ejguan August 30, 2022 16:27
@NivekT NivekT changed the title [DataPipe] Fixing function sigature validation [DataPipe] Fixing map function sigature validation Aug 30, 2022
@NivekT NivekT requested a review from ejguan August 30, 2022 16:30
Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

Thanks Kevin for the quick fix. LGTM, if CI is green.

@NivekT NivekT changed the title [DataPipe] Fixing map function sigature validation [DataPipe] Fixing map function signature validation Aug 30, 2022
@NivekT
Copy link
Contributor Author

NivekT commented Aug 30, 2022

Build failure unrelated (the master branch will be fixed soon). Will land tomorrow.

@NivekT
Copy link
Contributor Author

NivekT commented Aug 31, 2022

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

As pmeier [points out](#80267 (comment)), #80267 introduces a bug where an exception is thrown when a built-in function (or a function implemented in C) is used with `.map` because `inspect.signature(fn)` cannot find the function's signature.

This PR skips over a function when its signature cannot be found. I believe this case is rare, and if the `fn` is truly incompatible with the usage of `input_col`/`output_col`, an exception will be raised at run time such that users will be able to examine what is wrong.

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/nivekt/55/orig onto refs/remotes/origin/master, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/84279)

@NivekT
Copy link
Contributor Author

NivekT commented Aug 31, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Matched rule Core Maintainers, but PR #84279 was not reviewed yet by any of: ezyang, gchanan, soumith, dzhulgakov

Details for Dev Infra team Raised by workflow job

@NivekT
Copy link
Contributor Author

NivekT commented Aug 31, 2022

@pytorchbot merge

@janeyx99
Copy link
Contributor

Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea.

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered without a flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
… to allow more appropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
…ppropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: View failures on hud. Refusing to merge as mandatory check(s) pull failed for rule superuser.

Details for Dev Infra team Raised by workflow job

@NivekT
Copy link
Contributor Author

NivekT commented Aug 31, 2022

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

As pmeier [points out](#80267 (comment)), #80267 introduces a bug where an exception is thrown when a built-in function (or a function implemented in C) is used with `.map` because `inspect.signature(fn)` cannot find the function's signature.

This PR skips over a function when its signature cannot be found. I believe this case is rare, and if the `fn` is truly incompatible with the usage of `input_col`/`output_col`, an exception will be raised at run time such that users will be able to examine what is wrong.

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/nivekt/55/orig onto refs/remotes/origin/master, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/84279)

pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
ghstack-source-id: 7d75fcc597d83e0d3524e915116cde9205947326
Pull Request resolved: #84279
@NivekT
Copy link
Contributor Author

NivekT commented Aug 31, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here.
The merge job was triggered without a flag. This means that your change will be merged once all checks on your PR have passed (ETA: 0-4 Hours). If this is not the intended behavior, feel free to use some of the other merge options in the wiki.
Please reach out to the PyTorch DevX Team with feedback or questions!

pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
… to allow more appropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
…ppropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
… to allow more appropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Aug 31, 2022
…ppropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 1, 2022
… to allow more appropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 1, 2022
…ppropriate messages to be raised first"


Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."



[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Sep 1, 2022
…messages to be raised first (#84359)

Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
@janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."

Pull Request resolved: #84359
Approved by: https://github.com/janeyx99, https://github.com/ZainRizvi, https://github.com/malfet
facebook-github-bot pushed a commit that referenced this pull request Sep 2, 2022
Summary:
As pmeier [points out](#80267 (comment)), #80267 introduces a bug where an exception is thrown when a built-in function (or a function implemented in C) is used with `.map` because `inspect.signature(fn)` cannot find the function's signature.

This PR skips over a function when its signature cannot be found. I believe this case is rare, and if the `fn` is truly incompatible with the usage of `input_col`/`output_col`, an exception will be raised at run time such that users will be able to examine what is wrong.

Pull Request resolved: #84279
Approved by: https://github.com/pmeier, https://github.com/janeyx99

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/cfb9d0d23314fd28be118b6ca280ded55364e71c

Reviewed By: mehtanirav

Differential Revision: D39213537

Pulled By: NivekT

fbshipit-source-id: 58d176edb3877b0ed0ee74ef4b3a3e61950f7111
facebook-github-bot pushed a commit that referenced this pull request Sep 2, 2022
…messages to be raised first (#84359) (#84359)

Summary:
Changing the ordering in merge rules to allow more appropriate messages to be raised first.

Context: [#84279](#84279 (comment))
janeyx99: "Approving to unblock, but modifying the merge rules to move the Core maintainers rule to last would be a good idea."

Pull Request resolved: #84359
Approved by: https://github.com/janeyx99, https://github.com/ZainRizvi, https://github.com/malfet

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/d648375f13b4a4efd4cd35247098679fce5d4bcd

Reviewed By: mehtanirav

Differential Revision: D39214439

Pulled By: NivekT

fbshipit-source-id: 0fbff5b4aacb9365bdced9d7bbe28bd7c7815a55
@facebook-github-bot facebook-github-bot deleted the gh/nivekt/55/head branch September 4, 2022 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants