Skip to content

Commit

Permalink
docs: update docstring for start_upload_tb_log()
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 592648615
  • Loading branch information
sararob authored and copybara-github committed Dec 20, 2023
1 parent cd31c13 commit c033c59
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions google/cloud/aiplatform/tensorboard/uploader_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ def start_upload_tb_log(
):
"""continues to listen for new data in the logdir and uploads when it appears.
Note that after calling `start_upload_tb_log()` your thread will kept alive even if
an exception is thrown. To ensure the thread gets shut down, put any code after
`start_upload_tb_log()` and before `end_upload_tb_log()` in a `try` statement, and call
`end_upload_tb_log()` in `finally`. For example:
aiplatform.start_upload_tb_log(...)
try:
# your code here
finally:
aiplatform.end_upload_tb_log()
```
Sample usage:
aiplatform.init(location='us-central1', project='my-project')
Expand Down

0 comments on commit c033c59

Please sign in to comment.