You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/10/21 22:58:12 UTC

[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6728: [AutoScheduler] Use tempfile in tutorials

comaniac commented on a change in pull request #6728:
URL: https://github.com/apache/incubator-tvm/pull/6728#discussion_r509782452



##########
File path: tutorials/auto_scheduler/tune_conv2d_layer_cuda.py
##########
@@ -82,17 +84,19 @@ def conv2d_layer(N, H, W, CO, CI, KH, KW, stride, padding):
 # * :code:`num_measure_trials` is the number of measurement trials we can use during the search.
 #   We only make 10 trials in this tutorial for a fast demonstration. In practice, 1000 is a
 #   good value for the search to converge. You can do more trials according to your time budget.
-# * In addition, we use :code:`RecordToFile` to dump measurement records into a file `conv2d.json`.
+# * In addition, we use :code:`RecordToFile` to dump measurement records into a file.
+#   Note that here we use a temporarty file for demonstraction, but in practice you should use
+#   a more maintainable file name such as `conv2d.json`.
 #   The measurement records can be used to query the history best, resume the search,
 #   and do more analyses later.
 # * see :any:`auto_scheduler.TuningOptions`,
 #   :any:`auto_scheduler.LocalRPCMeasureContext` for more parameters.
-
+logfile = tempfile.NamedTemporaryFile(prefix="conv2d", suffix=".json")

Review comment:
       Sure. In that case do we still need to change `task_python_docs.sh`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org