From 0ec2a79adcd53953bc5ad645ad9baff04f28daf6 Mon Sep 17 00:00:00 2001 From: yifeim Date: Sat, 6 Jul 2019 17:22:38 -0700 Subject: [PATCH] Update profiler.md 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. --- docs/tutorials/python/profiler.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/tutorials/python/profiler.md b/docs/tutorials/python/profiler.md index f2da62833fcf..5be6bf83ac5d 100644 --- a/docs/tutorials/python/profiler.md +++ b/docs/tutorials/python/profiler.md @@ -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.