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 1 commit
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.

Rethrowing exceptions as part of mx.nd.waitall is not supported.
anirudh2290 marked this conversation as resolved.
Show resolved Hide resolved
If your code has exceptions, waitall can cause silent failures.
Avoid waitall in your code/precede it with wait_to_read for the outputs
unless you are confident about your code not throwing an exception in
any scenario.
"""
check_call(_LIB.MXNDArrayWaitAll())

Expand Down