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")
| 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) |
nothing calls this directly
no test coverage detected