Skip to content

Conversation

@jianyuh
Copy link
Member

@jianyuh jianyuh commented Jul 29, 2020

Stack from ghstack:

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/)

Differential Revision: D22801881

NOTE FOR REVIEWERS: This PR has internal Facebook specific changes or comments, please review them on Phabricator!

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/)

Differential Revision: [D22801881](https://our.internmc.facebook.com/intern/diff/D22801881/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D22801881/)!

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Jul 29, 2020

💊 CI failures summary and remediations

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


  • 4/4 failures possibly* introduced in this PR
    • 1/4 non-CircleCI failure(s)

🕵️ 3 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_macos_10_13_py3_test (1/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

Jul 28 23:11:06 RuntimeError: test_dataloader failed!
Jul 28 23:11:05 Generated XML report: test-reports/python-unittest/TEST-TestNamedTupleDataLoader-20200728225900.xml 
Jul 28 23:11:05 Generated XML report: test-reports/python-unittest/TEST-TestTensorDataset-20200728225900.xml 
Jul 28 23:11:05 Generated XML report: test-reports/python-unittest/TEST-TestCustomPinFn-20200728225900.xml 
Jul 28 23:11:05 Generated XML report: test-reports/python-unittest/TEST-TestSetAffinity-20200728225900.xml 
Jul 28 23:11:05 Generated XML report: test-reports/python-unittest/TEST-TestStringDataLoader-20200728225900.xml 
Jul 28 23:11:06 Traceback (most recent call last): 
Jul 28 23:11:06   File "test/run_test.py", line 744, in <module> 
Jul 28 23:11:06     main() 
Jul 28 23:11:06   File "test/run_test.py", line 733, in main 
Jul 28 23:11:06     raise RuntimeError(err) 
Jul 28 23:11:06 RuntimeError: test_dataloader failed! 
Jul 28 23:11:06 + cleanup 
Jul 28 23:11:06 + retcode=1 
Jul 28 23:11:06 + set +x 

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (2/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/binary_smoketest.py 
Auto-merging .circleci/cimodel/data/simple/binary_smoketest.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_data.py 
Auto-merging .circleci/cimodel/data/pytorch_build_data.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_data.py 
Auto-merging .circleci/cimodel/data/binary_build_data.py 
CONFLICT (add/add): Merge conflict in .circleci/README.md 
Auto-merging .circleci/README.md 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (3/3)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/simple/binary_smoketest.py 
Auto-merging .circleci/cimodel/data/simple/binary_smoketest.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_data.py 
Auto-merging .circleci/cimodel/data/pytorch_build_data.py 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/binary_build_data.py 
Auto-merging .circleci/cimodel/data/binary_build_data.py 
CONFLICT (add/add): Merge conflict in .circleci/README.md 
Auto-merging .circleci/README.md 
Automatic merge failed; fix conflicts and then commit the result. 

ci.pytorch.org: 1 failed


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 19 times.

Copy link
Collaborator

@dzhulgakov dzhulgakov left a comment

Choose a reason for hiding this comment

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

Looking good, just fix the test a bit please! And lint seems to be complaining

test/test_nn.py Outdated
for dtype, mode, trainable, include_last_offset in itertools.product(dtypes, modes, trainable_scale, include_last_offset):
test_per_sample_weights_new_offsets(mode, dtype, trainable, include_last_offset)
if mode != 'sum':
has_weight = False
Copy link
Collaborator

Choose a reason for hiding this comment

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

this actually disables has_weight for future iterations of the loop too :(

just pass has_weight and mode == 'sum' below as an arg

test/test_nn.py Outdated
modes = ('sum', 'max', 'mean')
trainable_scale = (True, False)
include_last_offset = (True, False)
has_weight = (True, False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

you probably wanted to include has_weight in the for loop iteration too

or you could do for simplicity:

modes = (('sum', False), ('sum', True), ('max', False), ('mean', False))

for dtype, (mode, has_weight), trainable, ...

test/test_nn.py Outdated
offsets = torch.tensor([0, 0, 3, 3, 6], device=device, dtype=torch.long)

if include_last_offset is True and mode == 'sum':
if include_last_offset is True:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: no need for is True :)

test/test_nn.py Outdated
def _embedding_bag_reference_impl(self, input, weight, offsets=None, mode='sum',
per_sample_weights=None, include_last_offset=False):
assert mode == 'sum'
assert mode == 'sum' or per_sample_weights == None
Copy link
Member

Choose a reason for hiding this comment

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

linter is yelling

…d max"

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/)

Differential Revision: [D22801881](https://our.internmc.facebook.com/intern/diff/D22801881/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D22801881/)!

[ghstack-poisoned]
…d max"

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/)

Differential Revision: [D22801881](https://our.internmc.facebook.com/intern/diff/D22801881/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D22801881/)!

[ghstack-poisoned]
…d max"

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/)

Differential Revision: [D22801881](https://our.internmc.facebook.com/intern/diff/D22801881/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D22801881/)!

[ghstack-poisoned]
jianyuh added a commit that referenced this pull request Jul 29, 2020
Pull Request resolved: #42215

Specifically on #27477 (comment)

We would like to supported with include_last=True overall for other reduction types like mean and max. It now causes further code fragmentation in DPER (https://www.internalfb.com/intern/diff/D22794469/).

More details: https://www.internalfb.com/intern/diff/D22794469/?dest_fbid=309597093427021&transaction_id=631457624153457


ghstack-source-id: 108733009

Differential Revision: [D22801881](https://our.internmc.facebook.com/intern/diff/D22801881/)

**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D22801881/)!
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1c5c289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants