PhilippvK commented on code in PR #12522:
URL: https://github.com/apache/tvm/pull/12522#discussion_r973563571


##########
python/tvm/autotvm/tuner/callback.py:
##########
@@ -178,3 +178,82 @@ def _callback(tuner, inputs, results):
             sys.stdout.flush()
 
     return _callback
+
+
+def visualize_progress(
+    idx, title="AutoTVM Progress", si_prefix="G", keep_open=False, live=True, 
out_path=None
+):
+    """Display tuning progress in graph
+
+    Parameters
+    ----------
+    idx: int
+        Index of the current task.
+    title: str
+        Specify the title of the matplotlib figure.
+    si_prefix: str
+        SI prefix for flops
+    keep_open: bool
+        Wait until the matplotlib window was closed by the user.
+    live: bool
+        If false, the graph is only written to the file specified in out_path.
+    out_path: str
+        Path where the graph image should be written (if defined).
+    """
+    import matplotlib.pyplot as plt
+
+    class _Context(object):

Review Comment:
   I'll try to refactor the code into a common base class 
`tvm.contrib.tune_viz.TuneVisualizer` and introduce `AutoTVMVisualizer` as well 
as `AutoSchedulerVisualizer` inheriting from that.
   
   I haven't touched MS (I guess MetaScheduler) yet, did you mean the 
AutoScheduler callback?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to