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
[JIT] Resolve string literal type annotations using Resolver::resolveType
#47731
Conversation
…eType` **Summary** This commit modifies `ScriptTypeParser::parseTypeFromExpr` so that string literal type annotations are resolved using `Resolver::resolveType`. At present, they are parsed in `parseBaseTypeName`, which inadvertently allows any key from `string_to_type_lut` to be used as a string literal type annotation. **Test Plan** Existing unit tests (most notably `TestClassType.test_self_referential_method` which tests the main feature, self-referential class type annotations, that make use of string literal type annotations). **Fixes** This commit fixes #47570. [ghstack-poisoned]
…eType` **Summary** This commit modifies `ScriptTypeParser::parseTypeFromExpr` so that string literal type annotations are resolved using `Resolver::resolveType`. At present, they are parsed in `parseBaseTypeName`, which inadvertently allows any key from `string_to_type_lut` to be used as a string literal type annotation. **Test Plan** Existing unit tests (most notably `TestClassType.test_self_referential_method` which tests the main feature, self-referential class type annotations, that make use of string literal type annotations). **Fixes** This commit fixes #47570. ghstack-source-id: 9e5a2c83f6211084a378df1863e662e2ced936ce Pull Request resolved: #47731
💊 CI failures summary and remediationsAs of commit 0eac8d4 (more details on the Dr. CI page):
1 failure not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 11 times. |
…ver::resolveType`" **Summary** This commit modifies `ScriptTypeParser::parseTypeFromExpr` so that string literal type annotations are resolved using `Resolver::resolveType`. At present, they are parsed in `parseBaseTypeName`, which inadvertently allows any key from `string_to_type_lut` to be used as a string literal type annotation. **Test Plan** Existing unit tests (most notably `TestClassType.test_self_referential_method` which tests the main feature, self-referential class type annotations, that make use of string literal type annotations). **Fixes** This commit fixes #47570. [ghstack-poisoned]
…eType` **Summary** This commit modifies `ScriptTypeParser::parseTypeFromExpr` so that string literal type annotations are resolved using `Resolver::resolveType`. At present, they are parsed in `parseBaseTypeName`, which inadvertently allows any key from `string_to_type_lut` to be used as a string literal type annotation. **Test Plan** Existing unit tests (most notably `TestClassType.test_self_referential_method` which tests the main feature, self-referential class type annotations, that make use of string literal type annotations). **Fixes** This commit fixes #47570. ghstack-source-id: 6323420f3446f75269e5d664450ee14be493b8f3 Pull Request resolved: #47731
ROCm CI failure due to CI script update. Will retest. |
@pytorchbot retest this please |
@SplitInfinity merged this pull request in 03d1978. |
@SplitInfinity merged this pull request in 03d1978. |
That's great! Didn't notice this fix is also coming |
…eType` (pytorch#47731) Summary: Pull Request resolved: pytorch#47731 **Summary** This commit modifies `ScriptTypeParser::parseTypeFromExpr` so that string literal type annotations are resolved using `Resolver::resolveType`. At present, they are parsed in `parseBaseTypeName`, which inadvertently allows any key from `string_to_type_lut` to be used as a string literal type annotation. **Test Plan** Existing unit tests (most notably `TestClassType.test_self_referential_method` which tests the main feature, self-referential class type annotations, that make use of string literal type annotations). **Fixes** This commit fixes pytorch#47570. Test Plan: Imported from OSS Reviewed By: navahgar Differential Revision: D24934717 Pulled By: SplitInfinity fbshipit-source-id: b915b2c08272566b63b3cf5ff4a07ad43bdc381a
Stack from ghstack:
Resolver::resolveType
#47731 [JIT] Resolve string literal type annotations usingResolver::resolveType
Summary
This commit modifies
ScriptTypeParser::parseTypeFromExpr
so thatstring literal type annotations are resolved using
Resolver::resolveType
. At present, they are parsed inparseBaseTypeName
, which inadvertently allows any key fromstring_to_type_lut
to be used as a string literal type annotation.Test Plan
Existing unit tests (most notably
TestClassType.test_self_referential_method
which tests the mainfeature, self-referential class type annotations, that make use of
string literal type annotations).
Fixes
This commit fixes #47570.
Differential Revision: D24934717