Skip to content

Conversation

SplitInfinity
Copy link

@SplitInfinity SplitInfinity commented Dec 5, 2020

Stack from ghstack:

Summary
This commit adds support for del statements with multiple targets.
Targets are deleted left-to-right just like Python.

Test Plan
This commit updates the TestBuiltins.test_del_multiple_operands unit
test to actually test that multiple deletion works instead of asserting
that an error is thrown.

Fixes
This commit fixes #48635.

Differential Revision: D25386285

**Summary**
This commit adds support for `del` statements with multiple targets.
Targets are deleted left-to-right just like Python.

**Test Plan**
This commit updates the `TestBuiltins.test_del_multiple_operands` unit
test to actually test that multiple deletion works instead of asserting
that an error is thrown.

[ghstack-poisoned]
SplitInfinity pushed a commit that referenced this pull request Dec 5, 2020
**Summary**
This commit adds support for `del` statements with multiple targets.
Targets are deleted left-to-right just like Python.

**Test Plan**
This commit updates the `TestBuiltins.test_del_multiple_operands` unit
test to actually test that multiple deletion works instead of asserting
that an error is thrown.

ghstack-source-id: 95de87f
Pull Request resolved: #48876
@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Dec 5, 2020
@dr-ci
Copy link

dr-ci bot commented Dec 5, 2020

💊 CI failures summary and remediations

As of commit 28eaa17 (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



🚧 5 ongoing upstream failures:

These were probably caused by upstream breakages that are not fixed yet:


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.

See how this bot performed.

This comment has been revised 13 times.


py_out = del_list_multiple_operands([0, 1, 2])
jit_out = torch.jit.script(del_list_multiple_operands)([0, 1, 2])
self.assertEquals(py_out, jit_out)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use self.checkScript?

Copy link
Author

Choose a reason for hiding this comment

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

You can't - list inputs are mutable. A list input will be mutated by the script function and then reused by the eager mode function.

**Summary**
This commit adds support for `del` statements with multiple targets.
Targets are deleted left-to-right just like Python.

**Test Plan**
This commit updates the `TestBuiltins.test_del_multiple_operands` unit
test to actually test that multiple deletion works instead of asserting
that an error is thrown.

**Fixes**
This commit fixes #48635. 

[ghstack-poisoned]
SplitInfinity pushed a commit that referenced this pull request Dec 7, 2020
**Summary**
This commit adds support for `del` statements with multiple targets.
Targets are deleted left-to-right just like Python.

**Test Plan**
This commit updates the `TestBuiltins.test_del_multiple_operands` unit
test to actually test that multiple deletion works instead of asserting
that an error is thrown.

ghstack-source-id: 4ec341a
Pull Request resolved: #48876
@facebook-github-bot
Copy link
Contributor

@SplitInfinity merged this pull request in 3f9ff48.

@facebook-github-bot facebook-github-bot deleted the gh/splitinfinity/79/head branch December 12, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants