Skip to content

Conversation

zasdfgbnm
Copy link
Collaborator

isfinite sounds like a better name, because PyTorch, C++, numpy all have this name instead of is_finite

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 24, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit b8ed4b6 (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.

@zasdfgbnm zasdfgbnm marked this pull request as draft May 24, 2022 21:32
@zasdfgbnm zasdfgbnm requested review from mruberry and ngimel May 24, 2022 22:21
@zasdfgbnm
Copy link
Collaborator Author

Is there some unit test I need to pay attention to?

@zasdfgbnm zasdfgbnm marked this pull request as ready for review May 24, 2022 22:34
@mruberry
Copy link
Collaborator

Is there some unit test I need to pay attention to?

No this is perfect, but because of #78058 this has to add an entry like these:

("prims::concatenate", datetime.date(9999, 1, 1)),

I'm going to update that test (or this PR can update it, both good) to stop checking BC/FC for ops in the "prims" namespace.

@zasdfgbnm
Copy link
Collaborator Author

I can try update the test, it should not be hard.

@zasdfgbnm
Copy link
Collaborator Author

Also fixes #78058

@zasdfgbnm
Copy link
Collaborator Author

backwards_compat is passing now

("prims::empty_like", datetime.date(9999, 1, 1)),
("prims::select", datetime.date(9999, 1, 1)),
("prims::concatenate", datetime.date(9999, 1, 1)),
("prims::.*", datetime.date(9999, 1, 1)),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Neat

Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Cool!

@mruberry
Copy link
Collaborator

@pytorchbot merge this

@github-actions
Copy link
Contributor

Hey @zasdfgbnm.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@zasdfgbnm zasdfgbnm deleted the isfinite-rename branch May 26, 2022 16:19
@IvanYashchuk
Copy link
Collaborator

Similarly is_infinite should be renamed to isinf to match PyTorch, NumPy, and C++.

@zasdfgbnm
Copy link
Collaborator Author

Yes, but it's better to remove is_infinite from prims, because it can be composed from infinite and isnan

facebook-github-bot pushed a commit that referenced this pull request May 31, 2022
Summary:
`isfinite` sounds like a better name, because PyTorch, C++, numpy all have this name instead of `is_finite`

Pull Request resolved: #78211
Approved by: https://github.com/ngimel, https://github.com/mruberry

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

Reviewed By: seemethere

Differential Revision: D36783145

Pulled By: seemethere

fbshipit-source-id: f21725bd34392db3c9108ea4a9e223d0c0c53b6e
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.

7 participants