Skip to content

Commit

Permalink
Update profiler.md (apache#15477)
Browse files Browse the repository at this point in the history
Add one line "dump all results to log file before download" to the main example. Otherwise, it is likely that a user may download partially-written and broken files.
  • Loading branch information
yifeim authored and Ubuntu committed Aug 20, 2019
1 parent 31a4906 commit 7df769b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/tutorials/python/profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ run_training_iteration(*next(itr))
mx.nd.waitall()
# Ask the profiler to stop recording
profiler.set_state('stop')
# Dump all results to log file before download
profiler.dump()
```

Between running and stopping the profiler, you can also pause and resume the profiler using `profiler.pause()` and `profiler.resume()` respectively to profile only parts of the code you want to profile.
Expand Down

0 comments on commit 7df769b

Please sign in to comment.