-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Disable tagged names #26356
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
Disable tagged names #26356
Conversation
This PR doesn't delete the code for them yet because it takes some effort to determine what to delete. I will send a followup PR fully deleting tagged names, but this PR disables their creation. Test Plan: - [namedtensor ci]
This PR doesn't delete the code for them yet because it takes some effort to determine what to delete. I will send a followup PR fully deleting tagged names, but this PR disables their creation. Test Plan: - [namedtensor ci] Pull Request resolved: #26356 Differential Revision: [D17428409](https://our.internmc.facebook.com/intern/diff/D17428409)
| check_valid_identifier(tag); | ||
| return Dimname(NameType::TAGGED, full_name, Symbol::dimname(untagged_name)); | ||
| check_valid_identifier(full_name.toUnqualString()); | ||
| return Dimname(full_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we're getting rid of tagged names, should it just be "name" instead of "full_name"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed that in the next diff in the stack: #26365.
This one is to just disable creation of tagged names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can merge the two PRs together (perhaps they make more sense as one unit) if that makes them easier to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, saw it.
| ASSERT_EQ(dimname.full_name(), foo); | ||
| ASSERT_EQ(dimname.untagged_name(), foo); | ||
|
|
||
| ASSERT_THROW(Dimname::fromSymbol(Symbol::dimname("inva.lid")), c10::Error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are we throwing in this case? that . isn't allowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are throwing the error message that says "only alphabetical and underscore characters are allowed"
This PR doesn't delete the code for them yet because it takes some effort to determine what to delete. I will send a followup PR fully deleting tagged names, but this PR disables their creation. Test Plan: - [namedtensor ci] Pull Request resolved: #26356 Differential Revision: [D17428409](https://our.internmc.facebook.com/intern/diff/D17428409)
This PR doesn't delete the code for them yet because it takes some effort to determine what to delete. I will send a followup PR fully deleting tagged names, but this PR disables their creation. Test Plan: - [namedtensor ci] Pull Request resolved: #26356 Differential Revision: [D17428409](https://our.internmc.facebook.com/intern/diff/D17428409)
Stack from ghstack:
This PR doesn't delete the code for them yet because it takes some effort to
determine what to delete. I will send a followup PR fully deleting
tagged names, but this PR disables their creation.
Test Plan:
Pull Request resolved: #26356
Differential Revision: D17428409