MCPcopy Create free account
hub / github.com/TPCD/DCCL / __init__

Method __init__

project_utils/visualization_utils.py:917–937  ·  view source on GitHub ↗

Args: fields: Currently unused plot_type: The name of the plot type, in Visdom Examples: >>> # Image example >>> img_to_use = skimage.data.coffee().swapaxes(0,2).swapaxes(1,2) >>> image_logger =

(self, plot_type, fields=None, win=None, env=None, opts={}, port=8097, server="localhost")

Source from the content-addressed store, hash-verified

915 '''
916
917 def __init__(self, plot_type, fields=None, win=None, env=None, opts={}, port=8097, server="localhost"):
918 '''
919 Args:
920 fields: Currently unused
921 plot_type: The name of the plot type, in Visdom
922
923 Examples:
924 >>> # Image example
925 >>> img_to_use = skimage.data.coffee().swapaxes(0,2).swapaxes(1,2)
926 >>> image_logger = VisdomLogger('image')
927 >>> image_logger.log(img_to_use)
928
929 >>> # Histogram example
930 >>> hist_data = np.random.rand(10000)
931 >>> hist_logger = VisdomLogger('histogram', , opts=dict(title='Random!', numbins=20))
932 >>> hist_logger.log(hist_data)
933 '''
934 super(VisdomLogger, self).__init__(fields, win, env, opts, port, server)
935 self.plot_type = plot_type
936 self.chart = getattr(self.viz, plot_type)
937 self.viz_logger = self._viz_prototype(self.chart)
938
939 def log(self, *args, **kwargs):
940 self.viz_logger(*args, **kwargs)

Callers

nothing calls this directly

Calls 2

_viz_prototypeMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected