Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Fix exception handling api doc #13519

Merged
merged 2 commits into from
Dec 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ def waitall():
"""Wait for all async operations to finish in MXNet.

This function is used for benchmarking only.
Copy link
Member

Choose a reason for hiding this comment

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

Not many people will understand what Rethrowing exception means. I suggest the below:

. warning:: This API is for internal purpose for benchmarking) , it does not do any error handling and can cause silent failures. Use it only if you are confident that your code error free, suggested to call wait_to_read on all outputs after waitall.

.. warning::
If your code has exceptions, `waitall` can cause silent failures.
For this reason you should avoid `waitall` in your code.
Use it only if you are confident that your code is error free.
Then make sure you call `wait_to_read` on all outputs after `waitall`.
"""
check_call(_LIB.MXNDArrayWaitAll())

Expand Down