Skip to content

Conversation

@nairbv
Copy link
Collaborator

@nairbv nairbv commented Jul 2, 2019

re-apply changes reverted in:
#22412

Also change log_softmax to take positional arguments. Long-term we do want the kwarg-only interface, but seems to currently be incompatible with jit serialization.

@pytorchbot pytorchbot added oncall: jit Add this issue/PR to JIT oncall triage queue module: cpp-extensions Related to torch.utils.cpp_extension module: internals Related to internal abstractions in c10 and ATen module: onnx Related to torch.onnx module: operators module: pybind Related to our Python bindings / interactions with other Python libraries module: tests Issues related to tests (not the torch.testing module) labels Jul 2, 2019
@nairbv nairbv requested a review from wanchaol July 2, 2019 17:55
Copy link
Collaborator

@wanchaol wanchaol left a comment

Choose a reason for hiding this comment

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

Can you add a test for log_softmax to test this specific positional argument/ kw-only argument problem? I would like to ensure we notice this breakage next time if we change the API again

@nairbv
Copy link
Collaborator Author

nairbv commented Jul 2, 2019

FYI @ailzhang, when I re-land this it'll re-break XLA

@nairbv
Copy link
Collaborator Author

nairbv commented Jul 2, 2019

Can you add a test for log_softmax to test this specific positional argument/ kw-only argument problem? I would like to ensure we notice this breakage next time if we change the API again

I think the test we'll want will be in jit?

@gchanan

@wanchaol
Copy link
Collaborator

wanchaol commented Jul 2, 2019

Can you add a test for log_softmax to test this specific positional argument/ kw-only argument problem? I would like to ensure we notice this breakage next time if we change the API again

I think the test we'll want will be in jit?

@gchanan

While I think we should add to the somewhere that JIT tests and Autograd tests can share with each other, like common_method_invocations.py, we will want to ensure the eager API change be captured as well.

@ailzhang
Copy link
Contributor

ailzhang commented Jul 2, 2019

@nairbv we should add dtype tests for all affected apis in common_method_invocations to prevent future breakage, e.g prod/cumsum/... etc (I think currently we don't have dtype tests coverage for them.)

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@nairbv has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@nairbv
Copy link
Collaborator Author

nairbv commented Jul 2, 2019

@nairbv we should add dtype tests for all affected apis in common_method_invocations to prevent future breakage, e.g prod/cumsum/... etc (I think currently we don't have dtype tests coverage for them.)

I'm happy to add tests, but it seems like if someone is explicitly changing the API (as I was) they might just also change the tests. If we had a test that attempted to load a model and failed, it'd be much clearer that something was meaningfully incorrect. Asserting that an API is what the API says it is seems a bit redundant.

@ailzhang
Copy link
Contributor

ailzhang commented Jul 2, 2019

@nairbv Yea I agree. We really should have had test coverage for those so that we knew it's BC breaking. I'm only requesting adding tests here to prevent future breakage :D

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@nairbv is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@nairbv has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@nairbv merged this pull request in 97a604e.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 4, 2019
… D16079809 (#22456)

Summary:
re-apply changes reverted in:
pytorch/pytorch#22412

Also change log_softmax to take positional arguments. Long-term we do want the kwarg-only interface, but seems to currently be incompatible with jit serialization.
Pull Request resolved: pytorch/pytorch#22456

Differential Revision: D16097159

Pulled By: nairbv

fbshipit-source-id: 8cb73e9ca18fc66b35b873cf4a574b167a578b3d
variants: function, method

- func: log_softmax(Tensor self, int dim) -> Tensor
- func: log_softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor
Copy link
Contributor

Choose a reason for hiding this comment

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

we should comment why this and softmax don't follow the usual convention.

xzhu1900 pushed a commit to xzhu1900/pytorch that referenced this pull request Jul 5, 2019
… D16079809 (pytorch#22456)

Summary:
re-apply changes reverted in:
pytorch#22412

Also change log_softmax to take positional arguments. Long-term we do want the kwarg-only interface, but seems to currently be incompatible with jit serialization.
Pull Request resolved: pytorch#22456

Differential Revision: D16097159

Pulled By: nairbv

fbshipit-source-id: 8cb73e9ca18fc66b35b873cf4a574b167a578b3d
facebook-github-bot pushed a commit that referenced this pull request Jul 10, 2019
Summary:
Address the review comment made by gchanan here:

#22456 (comment)
Pull Request resolved: #22651

Differential Revision: D16181828

Pulled By: nairbv

fbshipit-source-id: 0d41a9024c2664298c281e198a997be73e7f8499
zdevito pushed a commit to zdevito/ATen that referenced this pull request Jul 10, 2019
Summary:
Address the review comment made by gchanan here:

pytorch/pytorch#22456 (comment)
Pull Request resolved: pytorch/pytorch#22651

Differential Revision: D16181828

Pulled By: nairbv

fbshipit-source-id: 0d41a9024c2664298c281e198a997be73e7f8499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: cpp-extensions Related to torch.utils.cpp_extension module: internals Related to internal abstractions in c10 and ATen module: onnx Related to torch.onnx module: pybind Related to our Python bindings / interactions with other Python libraries module: tests Issues related to tests (not the torch.testing module) oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants