KEMBAR78
adding a note to the documentation of polar by NivekT · Pull Request #63259 · pytorch/pytorch · GitHub
Skip to content

Conversation

@NivekT
Copy link
Contributor

@NivekT NivekT commented Aug 13, 2021

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 13, 2021

🔗 Helpful links

💊 CI failures summary and remediations

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


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

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

See CircleCI build pytorch_linux_xenial_py3_clang7_asan_test2 (1/1)

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

Aug 17 18:15:17 test_remote_message_script_de...yUniqueId(created_on=0, local_id=0) to be created.
Aug 17 18:14:34 frame #13: <unknown function> + 0x19892aa0 (0x7f94a61c8aa0 in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so)
Aug 17 18:14:34 frame #14: c10::ThreadPool::main_loop(unsigned long) + 0x7f1 (0x7f9483423b91 in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
Aug 17 18:14:34 frame #15: <unknown function> + 0xb8c80 (0x7f94cfa54c80 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6)
Aug 17 18:14:34 frame #16: <unknown function> + 0x76ba (0x7f94d00ef6ba in /lib/x86_64-linux-gnu/libpthread.so.0)
Aug 17 18:14:34 frame #17: clone + 0x6d (0x7f94cfe2551d in /lib/x86_64-linux-gnu/libc.so.6)
Aug 17 18:14:34 
Aug 17 18:14:35 ok (7.807s)
Aug 17 18:14:46   test_remote_message_dropped_pickle (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (11.817s)
Aug 17 18:14:58   test_remote_message_dropped_pickle_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (11.919s)
Aug 17 18:15:09   test_remote_message_script_delay_timeout (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... ok (10.713s)
Aug 17 18:15:17   test_remote_message_script_delay_timeout_to_self (__main__.FaultyFaultyAgentRpcTestWithSpawn) ... [E request_callback_no_python.cpp:559] Received error while processing request type 260: falseINTERNAL ASSERT FAILED at "/var/lib/jenkins/workspace/torch/csrc/distributed/rpc/rref_context.cpp":387, please report a bug to PyTorch. Expected OwnerRRef with id GloballyUniqueId(created_on=0, local_id=0) to be created.
Aug 17 18:15:17 Exception raised from getOwnerRRef at /var/lib/jenkins/workspace/torch/csrc/distributed/rpc/rref_context.cpp:387 (most recent call first):
Aug 17 18:15:17 frame #0: <unknown function> + 0x1a231c (0x7f3f1a00731c in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
Aug 17 18:15:17 frame #1: std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > ()>::operator()() const + 0x6d (0x7f3f3ba54cbd in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so)
Aug 17 18:15:17 frame #2: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x160 (0x7f3f1a005800 in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
Aug 17 18:15:17 frame #3: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x18a (0x7f3f1a00066a in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
Aug 17 18:15:17 frame #4: c10::detail::torchInternalAssertFail(char const*, char const*, unsigned int, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x115 (0x7f3f1a000d75 in /opt/conda/lib/python3.6/site-packages/torch/lib/libc10.so)
Aug 17 18:15:17 frame #5: torch::distributed::rpc::RRefContext::getOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, bool) + 0xd62 (0x7f3f3ccc9f12 in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so)
Aug 17 18:15:17 frame #6: torch::distributed::rpc::RequestCallbackNoPython::assignOwnerRRef(torch::distributed::rpc::GloballyUniqueId const&, torch::distributed::rpc::GloballyUniqueId const&, c10::intrusive_ptr<c10::ivalue::Future, c10::detail::intrusive_target_default_null_type<c10::ivalue::Future> >) const + 0x223 (0x7f3f3cc8ed73 in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so)
Aug 17 18:15:17 frame #7: torch::distributed::rpc::RequestCallbackImpl::processScriptRemoteCall(torch::distributed::rpc::RpcCommandBase&, std::vector<c10::Stream, std::allocator<c10::Stream> >) const + 0x8e3 (0x7f3f5f423db3 in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
Aug 17 18:15:17 frame #8: torch::distributed::rpc::RequestCallbackNoPython::processRpc(torch::distributed::rpc::RpcCommandBase&, torch::distributed::rpc::MessageType const&, std::vector<c10::Stream, std::allocator<c10::Stream> >) const + 0x78d (0x7f3f3cc8befd in /opt/conda/lib/python3.6/site-packages/torch/lib/libtorch_cpu.so)

1 job timed out:

  • pytorch_linux_xenial_py3_clang7_asan_test2

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 to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

NivekT added a commit that referenced this pull request Aug 13, 2021
ghstack-source-id: d038744
Pull Request resolved: #63259
@NivekT
Copy link
Contributor Author

NivekT commented Aug 13, 2021

Note that we still need to decide if we will add a check to prevent negative inputs arguments. If not, we should make it explicit that negative values are allowed.

@NivekT NivekT requested a review from mruberry August 13, 2021 21:42
@NivekT NivekT changed the title adding a note to documentation of polar adding a note to the documentation of polar Aug 13, 2021
@mruberry mruberry requested review from anjali411 and mruberry August 15, 2021 03:33
@mruberry
Copy link
Collaborator

@anjali411 anjali411 added module: complex Related to complex number support in PyTorch module: docs Related to our documentation, both in docs/ and docblocks labels Aug 16, 2021
Copy link
Contributor

@anjali411 anjali411 left a comment

Choose a reason for hiding this comment

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

I am not sure about the utility of this note, especially because the function description is straightforward and clear. I think these notes are useful when we differ from libraries like numpy or SciPy on subtle details, but that's not the case here.

On a different note, we might wanna consider being in line with SciPy and changing the name of this operation.

NivekT added a commit that referenced this pull request Aug 16, 2021
ghstack-source-id: 762c421
Pull Request resolved: #63259
@NivekT
Copy link
Contributor Author

NivekT commented Aug 16, 2021

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

@NivekT
Copy link
Contributor Author

NivekT commented Aug 16, 2021

I can see this note being useful for users of cmath and SciPy who expect this function to work the same way as it does in the other two libraries, but doesn't know about the implementation of std::polar exists. They may have questions about why we are doing the inverse and this note clarifies that.

I do agree that it may be better to follow SciPy's implementation, but that may have backward compatibility issue?

@anjali411
Copy link
Contributor

Note that we still need to decide if we will add a check to prevent negative inputs arguments. If not, we should make it explicit that negative values are allowed.

std::polar doesn't error out for negative abs value so I guess we can do the same too.

NivekT added a commit that referenced this pull request Aug 16, 2021
ghstack-source-id: 671cae8
Pull Request resolved: #63259
@NivekT
Copy link
Contributor Author

NivekT commented Aug 16, 2021

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

NivekT added a commit that referenced this pull request Aug 17, 2021
ghstack-source-id: affa44a
Pull Request resolved: #63259
@NivekT
Copy link
Contributor Author

NivekT commented Aug 17, 2021

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

@NivekT
Copy link
Contributor Author

NivekT commented Aug 17, 2021

I think it should be good to go now. Please have a look and approve if you agree.

Copy link
Contributor

@anjali411 anjali411 left a comment

Choose a reason for hiding this comment

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

Thanks @NivekT for this doc update! I left one last comment, but the PR is good to go after that's addressed.

NivekT added a commit that referenced this pull request Aug 17, 2021
ghstack-source-id: 645b50e
Pull Request resolved: #63259
@NivekT
Copy link
Contributor Author

NivekT commented Aug 17, 2021

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

@facebook-github-bot
Copy link
Contributor

@NivekT merged this pull request in e0e2796.

@facebook-github-bot facebook-github-bot deleted the gh/NivekT/3/head branch August 21, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: complex Related to complex number support in PyTorch module: docs Related to our documentation, both in docs/ and docblocks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants