experiment.visdom module¶
-
class
experiment.visdom.
Line
(name: str, window: experiment.visdom.Window, opts: dict = None)[source]¶ Bases:
object
Class that encapsulates the creation and use of line plots.
Parameters: - name (str) – Name of line (used in the legend). The name is also important when plotting multiple lines on the same plot.
- window (Window) – Window object to plot the line to.
- opts (dict) – Optional visdom opts parameters to apply to the line.
-
class
experiment.visdom.
ParametersControlWindow
(env, xlabel=None, ylabel=None, title=None, showlegend=False)[source]¶ Bases:
experiment.visdom.Window
Visdom window for controlling parameters.
Parameters: env (string) – The visdom environment to log to.
-
class
experiment.visdom.
ParametersViewWindow
(env, xlabel=None, ylabel=None, title=None, showlegend=False)[source]¶ Bases:
experiment.visdom.Window
Visdom window for viewing parameters.
Parameters: - env (string) – The visdom environment to log to.
- xlabel (string) – xlabel of plot.
- ylabel (string) – ylabel of plot.
- title (string) – Title of the plot.
- showlegend (bool) – Whether to show a legend.
-
class
experiment.visdom.
VisdomLogHandler
(env, title='Logging', *args, **kwds)[source]¶ Bases:
logging.Handler
Logging handler that logs to a Visdom text window.
Parameters: - env (string) – The visdom environment to log to.
- title (string) – Title of the logger window
-
class
experiment.visdom.
Window
(env, xlabel=None, ylabel=None, title=None, showlegend=False)[source]¶ Bases:
object
Class for creating visdom windows.
Parameters: - env (string) – The visdom environment to log to.
- xlabel (string) – xlabel of plot.
- ylabel (string) – ylabel of plot.
- title (string) – Title of the plot.
- showlegend (bool) – Whether to show a legend.
-
env
¶
-
opts
¶
-
update_mode
¶
-
win
¶
-
experiment.visdom.
create_parameters_windows
()[source]¶ Create control and view windows for parameters
Parameters: - env (string) – The visdom environment to log to.
- xlabel (string) – xlabel of plot.
- ylabel (string) – ylabel of plot.
- title (string) – Title of the plot.
- showlegend (bool) – Whether to show a legend.
-
experiment.visdom.
create_plot_window
(vis, env, xlabel, ylabel, title, legend=None)[source]¶ Create a plot window.
Parameters: - vis (object) – The Visdom object.
- env (string) – The visdom environment to log to.
- xlabel (string) – xlabel of plot.
- ylabel (string) – ylabel of plot.
- title (string) – Title of the plot.
- legend (string) – Legend of line.
Note
Depracated. Use the new Window interface.
-
experiment.visdom.
monitor_gpu
(env: str, gpu_index: int = None, xtick_size: int = 100) → threading.Thread[source]¶ Monitor the memory and utilization of a GPU.
Parameters: - env (str) – The visdom environment to log to.
- gpu_index (int) – The GPU to monitor.
-
experiment.visdom.
setup_visdom
(server: str = '', log_to_filename: str = None, save_by_default: bool = True) → visdom.Visdom[source]¶ Setup the communication with the visdom server.
Parameters: - server (str) – IP of visdom server.
- log_to_filename (str) – If not None, a log of the plots will be saved to this path. This log can be later replayed into visdom.
- save_by_default (bool) – Automatically save the environment each update (Saved under ‘~/.visdom/<ENV>’