A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.

Overview

Visdom

visdom_big

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Python.

Overview

Visdom aims to facilitate visualization of (remote) data with an emphasis on supporting scientific experimentation.

Broadcast visualizations of plots, images, and text for yourself and your collaborators.

Organize your visualization space programmatically or through the UI to create dashboards for live data, inspect results of experiments, or debug experimental code.


Concepts

Visdom has a simple set of features that can be composed for various use-cases.

Windows

The UI begins as a blank slate – you can populate it with plots, images, and text. These appear in windows that you can drag, drop, resize, and destroy. The windows live in envs and the state of envs is stored across sessions. You can download the content of windows – including your plots in svg.

Tip: You can use the zoom of your browser to adjust the scale of the UI.

Callbacks

The python Visdom implementation supports callbacks on a window. The demo shows an example of this in the form of an editable text pad. The functionality of these callbacks allows the Visdom object to receive and react to events that happen in the frontend.

You can subscribe a window to events by adding a function to the event handlers dict for the window id you want to subscribe by calling viz.register_event_handler(handler, win_id) with your handler and the window id. Multiple handlers can be registered to the same window. You can remove all event handlers from a window using viz.clear_event_handlers(win_id). When an event occurs to that window, your callbacks will be called on a dict containing:

  • event_type: one of the below event types
  • pane_data: all of the stored contents for that window including layout and content.
  • eid: the current environment id
  • target: the window id the event is called on

Additional parameters are defined below.

Right now the following callback events are supported:

  1. Close - Triggers when a window is closed. Returns a dict with only the aforementioned fields.
  2. KeyPress - Triggers when a key is pressed. Contains additional parameters:
    • key - A string representation of the key pressed (applying state modifiers such as SHIFT)
    • key_code - The javascript event keycode for the pressed key (no modifiers)
  3. PropertyUpdate - Triggers when a property is updated in Property pane
    • propertyId - Position in properties list
    • value - New property value
  4. Click - Triggers when Image pane is clicked on, has a parameter:
    • image_coord - dictionary with the fields x and y for the click coordinates in the coordinate frame of the possibly zoomed/panned image (not the enclosing pane).

Environments

You can partition your visualization space with envs. By default, every user will have an env called main. New envs can be created in the UI or programmatically. The state of envs is chronically saved. Environments are able to keep entirely different pools of plots.

You can access a specific env via url: http://localhost.com:8097/env/main. If your server is hosted, you can share this url so others can see your visualizations too.

Environments are automatically hierarchically organized by the first _.

Selecting Environments

From the main page it is possible to toggle between different environments using the environment selector. Selecting a new environment will query the server for the plots that exist in that environment. The environment selector allows for searching and filtering for the new enironment.

Comparing Environments

From the main page it is possible to compare different environments using the environment selector. Selecting multiple environments in the check box will query the server for the plots with the same titles in all environments and plot them in a single plot. An additional compare legend pane is created with a number corresponding to each selected environment. Individual plots are updated with legends corresponding to "x_name" where x is a number corresponding with the compare legend pane and name is the original name in the legend.

Note: The compare envs view is not robust to high throughput data, as the server is responsible for generating the compared content. Do not compare an environment that is receiving a high quantity of updates on any plot, as every update will request regenerating the comparison. If you need to compare two plots that are receiving high quantities of data, have them share the same window on a singular env.

Clearing Environments

You can use the eraser button to remove all of the current contents of an environment. This closes the plot windows for that environment but keeps the empty environment for new plots.

Managing Environments

Pressing the folder icon opens a dialog that allows you to fork or force save the current environment, or delete any of your existing environments. Use of this feature is fully described in the State section.

Env Files: Your envs are loaded at initialization of the server, by default from $HOME/.visdom/. Custom paths can be passed as a cmd-line argument. Envs are removed by using the delete button or by deleting the corresponding .json file from the env dir.

State

Once you've created a few visualizations, state is maintained. The server automatically caches your visualizations -- if you reload the page, your visualizations reappear.

  • Save: You can manually do so with the save button. This will serialize the env's state (to disk, in JSON), including window positions. You can save an env programmatically.
    This is helpful for more sophisticated visualizations in which configuration is meaningful, e.g. a data-rich demo, a model training dashboard, or systematic experimentation. This also makes them easy to share and reuse.

  • Fork: If you enter a new env name, saving will create a new env -- effectively forking the previous env.

Tip: Fork an environment before you begin to make edits to ensure that your changes are saved seperately.

Filter

You can use the filter to dynamically sift through windows present in an env -- just provide a regular expression with which to match titles of window you want to show. This can be helpful in use cases involving an env with many windows e.g. when systematically checking experimental results.

Note: If you have saved your current view, the view will be restored after clearing the filter.

Views

It is possible to manage the views simply by dragging the tops of windows around, however additional features exist to keep views organized and save common views. View management can be useful for saving and switching between multiple common organizations of your windows.

Saving/Deleting Views

Using the folder icon, a dialog window opens where views can be forked in the same way that envs can be. Saving a view will retain the position and sizes of all of the windows in a given environment. Views are saved in $HOME/.visdom/view/layouts.json in the visdom filepath.

Note: Saved views are static, and editing a saved view copies that view over to the current view where editing can occur.

Re-Packing

Using the repack icon (9 boxes), visdom will attempt to pack your windows in a way that they best fit while retaining row/column ordering.

Note: Due to the reliance on row/column ordering and ReactGridLayout the final layout might be slightly different than what might be expected. We're working on improving that experience or providing alternatives that give more fine-tuned control.

Reloading Views

Using the view dropdown it is possible to select previously saved views, restoring the locations and sizes of all of the windows within the current environment to the places they were when that view was saved last.

Setup

Requires Python 3

# Install Python server and client from pip
# (STABLE VERSION, NOT ALL CURRENT FEATURES ARE SUPPORTED)
pip install visdom
# Install visdom from source
pip install -e .
# If the above runs into issues, you can try the below
easy_install .

Usage

Start the server (probably in a screen or tmux) from the command line:

> visdom

Visdom now can be accessed by going to http://localhost:8097 in your browser, or your own host address if specified.

The visdom command is equivalent to running python -m visdom.server.

If the above does not work, try using an SSH tunnel to your server by adding the following line to your local ~/.ssh/config: LocalForward 127.0.0.1:8097 127.0.0.1:8097.

Command Line Options

The following options can be provided to the server:

  1. -port : The port to run the server on.
  2. -hostname : The hostname to run the server on.
  3. -base_url : The base server url (default = /).
  4. -env_path : The path to the serialized session to reload.
  5. -logging_level : Logging level (default = INFO). Accepts both standard text and numeric logging values.
  6. -readonly : Flag to start server in readonly mode.
  7. -enable_login : Flag to setup authentication for the sever, requiring a username and password to login.
  8. -force_new_cookie : Flag to reset the secure cookie used by the server, invalidating current login cookies. Requires -enable_login.
  9. -bind_local : Flag to make the server accessible only from localhost.

When -enable_login flag is provided, the server asks user to input credentials using terminal prompt. Alternatively, you can setup VISDOM_USE_ENV_CREDENTIALS env variable, and then provide your username and password via VISDOM_USERNAME and VISDOM_PASSWORD env variables without manually interacting with the terminal. This setup is useful in case if you would like to launch visdom server from bash script, or from Jupyter notebook.

VISDOM_USERNAME=username
VISDOM_PASSWORD=password
VISDOM_USE_ENV_CREDENTIALS=1 visdom -enable_login

You can also use VISDOM_COOKIE variable to provide cookies value if the cookie file wasn't generated, or the flag -force_new_cookie was set.

Python example

import visdom
import numpy as np
vis = visdom.Visdom()
vis.text('Hello, world!')
vis.image(np.ones((3, 10, 10)))

Demos

python example/demo.py

API

For a quick introduction into the capabilities of visdom, have a look at the example directory, or read the details below.

Visdom Arguments (Python only)

The python visdom client takes a few options:

  • server: the hostname of your visdom server (default: 'http://localhost')
  • port: the port for your visdom server (default: 8097)
  • base_url: the base visdom server url (default: /)
  • env: Default environment to plot to when no env is provided (default: main)
  • raise_exceptions: Raise exceptions upon failure rather than printing them (default: True (soon))
  • log_to_filename: If not none, log all plotting and updating events to the given file (append mode) so that they can be replayed later using replay_log (default: None)
  • use_incoming_socket: enable use of the socket for receiving events from the web client, allowing user to register callbacks (default: True)
  • http_proxy_host: Deprecated. Use Proxies argument for complete proxy support.
  • http_proxy_port: Deprecated. Use Proxies argument for complete proxy support.
  • username: username to use for authentication, if server started with -enable_login (default: None)
  • password: password to use for authentication, if server started with -enable_login (default: None)
  • proxies: Dictionary mapping protocol to the URL of the proxy (e.g. {http: foo.bar:3128}) to be used on each Request. (default: None)
  • offline: Flag to run visdom in offline mode, where all requests are logged to file rather than to the server. Requires log_to_filename is set. In offline mode, all visdom commands that don't create or update plots will simply return True. (default: False)

Other options are either currently unused (endpoint, ipv6) or used for internal functionality.

Basics

Visdom offers the following basic visualization functions:

Plotting

We have wrapped several common plot types to make creating basic visualizations easily. These visualizations are powered by Plotly.

The following API is currently supported:

Generic Plots

Note that the server API adheres to the Plotly convention of data and layout objects, such that you can produce your own arbitrary Plotly visualizations:

import visdom
vis = visdom.Visdom()

trace = dict(x=[1, 2, 3], y=[4, 5, 6], mode="markers+lines", type='custom',
             marker={'color': 'red', 'symbol': 104, 'size': "10"},
             text=["one", "two", "three"], name='1st Trace')
layout = dict(title="First Plot", xaxis={'title': 'x1'}, yaxis={'title': 'x2'})

vis._send({'data': [trace], 'layout': layout, 'win': 'mywin'})

Others

Details

visdom_big

Basics

vis.image

This function draws an img. It takes as input an CxHxW tensor img that contains the image.

The following opts are supported:

  • jpgquality: JPG quality (number 0-100). If defined image will be saved as JPG to reduce file size. If not defined image will be saved as PNG.
  • caption: Caption for the image
  • store_history: Keep all images stored to the same window and attach a slider to the bottom that will let you select the image to view. You must always provide this opt when sending new images to an image with history.

Note You can use alt on an image pane to view the x/y coordinates of the cursor. You can also ctrl-scroll to zoom, alt scroll to pan vertically, and alt-shift scroll to pan horizontally. Double click inside the pane to restore the image to default.

vis.images

This function draws a list of images. It takes an input B x C x H x W tensor or a list of images all of the same size. It makes a grid of images of size (B / nrow, nrow).

The following arguments and opts are supported:

  • nrow: Number of images in a row
  • padding: Padding around the image, equal padding around all 4 sides
  • opts.jpgquality: JPG quality (number 0-100). If defined image will be saved as JPG to reduce file size. If not defined image will be saved as PNG.
  • opts.caption: Caption for the image

vis.text

This function prints text in a box. You can use this to embed arbitrary HTML. It takes as input a text string. No specific opts are currently supported.

vis.properties

This function shows editable properties in a pane. Properties are expected to be a List of Dicts e.g.:

    properties = [
        {'type': 'text', 'name': 'Text input', 'value': 'initial'},
        {'type': 'number', 'name': 'Number input', 'value': '12'},
        {'type': 'button', 'name': 'Button', 'value': 'Start'},
        {'type': 'checkbox', 'name': 'Checkbox', 'value': True},
        {'type': 'select', 'name': 'Select', 'value': 1, 'values': ['Red', 'Green', 'Blue']},
    ]

Supported types:

  • text: string
  • number: decimal number
  • button: button labeled with "value"
  • checkbox: boolean value rendered as a checkbox
  • select: multiple values select box
    • value: id of selected value (zero based)
    • values: list of possible values

Callback are called on property value update:

  • event_type: "PropertyUpdate"
  • propertyId: position in the properties list
  • value: new value

No specific opts are currently supported.

vis.audio

This function plays audio. It takes as input the filename of the audio file or an N tensor containing the waveform (use an Nx2 matrix for stereo audio). The function does not support any plot-specific opts.

The following opts are supported:

  • opts.sample_frequency: sample frequency (integer > 0; default = 44100)

Known issue: Visdom uses scipy to convert tensor inputs to wave files. Some versions of Chrome are known not to play these wave files (Firefox and Safari work fine).

vis.video

This function plays a video. It takes as input the filename of the video videofile or a LxHxWxC-sized tensor containing all the frames of the video as input. The function does not support any plot-specific opts.

The following opts are supported:

  • opts.fps: FPS for the video (integer > 0; default = 25)

Note: Using tensor input requires that ffmpeg is installed and working. Your ability to play video may depend on the browser you use: your browser has to support the Theano codec in an OGG container (Chrome supports this).

vis.svg

This function draws an SVG object. It takes as input a SVG string svgstr or the name of an SVG file svgfile. The function does not support any specific opts.

vis.matplot

This function draws a Matplotlib plot. The function supports one plot-specific option: resizable.

Note When set to True the plot is resized with the pane. You need beautifulsoup4 and lxml packages installed to use this option.

Note: matplot is not rendered using the same backend as plotly plots, and is somewhat less efficient. Using too many matplot windows may degrade visdom performance.

vis.plotlyplot

This function draws a Plotly Figure object. It does not explicitly take options as it assumes you have already explicitly configured the figure's layout.

Note You must have the plotly Python package installed to use this function. It can typically be installed by running pip install plotly.

vis.embeddings

This function visualizes a collection of features using the Barnes-Hut t-SNE algorithm.

The function accepts the following arguments:

  • features: a list of tensors
  • labels: a list of corresponding labels for the tensors provided for features
  • data_getter=fn: (optional) a function that takes as a parameter an index into the features array and returns a summary representation of the tensor. If this is set, data_type must also be set.
  • data_type=str: (optional) currently the only acceptable value here is "html"

We currently assume that there are no more than 10 unique labels, in the future we hope to provide a colormap in opts for other cases.

From the UI you can also draw a lasso around a subset of features. This will rerun the t-SNE visualization on the selected subset.

vis.save

This function saves the envs that are alive on the visdom server. It takes input a list of env ids to be saved.

Plotting

Further details on the wrapped plotting functions are given below.

The exact inputs into the plotting functions vary, although most of them take as input a tensor X than contains the data and an (optional) tensor Y that contains optional data variables (such as labels or timestamps). All plotting functions take as input an optional win that can be used to plot into a specific window; each plotting function also returns the win of the window it plotted in. One can also specify the env to which the visualization should be added.

vis.scatter

This function draws a 2D or 3D scatter plot. It takes as input an Nx2 or Nx3 tensor X that specifies the locations of the N points in the scatter plot. An optional N tensor Y containing discrete labels that range between 1 and K can be specified as well -- the labels will be reflected in the colors of the markers.

update can be used to efficiently update the data of an existing plot. Use 'append' to append data, 'replace' to use new data, or 'remove' to remove the trace specified by name. Using update='append' will create a plot if it doesn't exist and append to the existing plot otherwise. If updating a single trace, use name to specify the name of the trace to be updated. Update data that is all NaN is ignored (can be used for masking update).

The following opts are supported:

  • opts.markersymbol : marker symbol (string; default = 'dot')
  • opts.markersize : marker size (number; default = '10')
  • opts.markercolor : color per marker. (torch.*Tensor; default = nil)
  • opts.markerborderwidth: marker border line width (float; default = 0.5)
  • opts.legend : table containing legend names
  • opts.textlabels : text label for each point (list: default = None)
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.
  • opts.traceopts : dict mapping trace names or indices to dicts of additional options that the graph backend accepts. For example traceopts = {'plotly': {'myTrace': {'mode': 'markers'}}}.
  • opts.webgl : use WebGL for plotting (boolean; default = false). It is faster if a plot contains too many points. Use sparingly as browsers won't allow more than a couple of WebGL contexts on a single page.

opts.markercolor is a Tensor with Integer values. The tensor can be of size N or N x 3 or K or K x 3.

  • Tensor of size N: Single intensity value per data point. 0 = black, 255 = red
  • Tensor of size N x 3: Red, Green and Blue intensities per data point. 0,0,0 = black, 255,255,255 = white
  • Tensor of size K and K x 3: Instead of having a unique color per data point, the same color is shared for all points of a particular label.

vis.sunburst

This function draws a sunburst chart. It takes two inputs: parents and labels array. values from parents array is used as parents object, like it define above which sector should the this sector shown. values from labels array is used to define sector's label or you can say name. keep in mind that lenght of array parents and labels should be equal. There is a third array that you can pass to which is value, it is use to show a value on hovering over a sector, it is optional argument, but if you are passing it then keep in mind lenght of values should be equal to parents or labels.

Following opts are currently supported:

  • opts.font_size : define font size of label (int)
  • opts.font_color : define font color of label (string)
  • opts.opacity : define opacity of chart (float)
  • opts.line_width : define distance between two sectors and sector to its parents (int)

vis.line

This function draws a line plot. It takes as input an N or NxM tensor Y that specifies the values of the M lines (that connect N points) to plot. It also takes an optional X tensor that specifies the corresponding x-axis values; X can be an N tensor (in which case all lines will share the same x-axis values) or have the same size as Y.

update can be used to efficiently update the data of an existing plot. Use 'append' to append data, 'replace' to use new data, or 'remove' to remove the trace specified by name. If updating a single trace, use name to specify the name of the trace to be updated. Update data that is all NaN is ignored (can be used for masking update).

The following opts are supported:

  • opts.fillarea : fill area below line (boolean)
  • opts.markers : show markers (boolean; default = false)
  • opts.markersymbol: marker symbol (string; default = 'dot')
  • opts.markersize : marker size (number; default = '10')
  • opts.linecolor : line colors (np.array; default = None)
  • opts.dash : line dash type for each line (np.array; default = 'solid'), one of solid, dash, dashdot or dash, size should match number of lines being drawn
  • opts.legend : table containing legend names
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.
  • opts.traceopts : dict mapping trace names or indices to dicts of additional options that plot.ly accepts for a trace.
  • opts.webgl : use WebGL for plotting (boolean; default = false). It is faster if a plot contains too many points. Use sparingly as browsers won't allow more than a couple of WebGL contexts on a single page.

vis.stem

This function draws a stem plot. It takes as input an N or NxM tensor X that specifies the values of the N points in the M time series. An optional N or NxM tensor Y containing timestamps can be specified as well; if Y is an N tensor then all M time series are assumed to have the same timestamps.

The following opts are supported:

  • opts.colormap: colormap (string; default = 'Viridis')
  • opts.legend : table containing legend names
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.heatmap

This function draws a heatmap. It takes as input an NxM tensor X that specifies the value at each location in the heatmap.

The following opts are supported:

  • opts.colormap : colormap (string; default = 'Viridis')
  • opts.xmin : clip minimum value (number; default = X:min())
  • opts.xmax : clip maximum value (number; default = X:max())
  • opts.columnnames: table containing x-axis labels
  • opts.rownames : table containing y-axis labels
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.
  • opts.nancolor : color for plotting NaNs. If this is None, NaNs will be plotted as transparent. (string; default = None)

vis.bar

This function draws a regular, stacked, or grouped bar plot. It takes as input an N or NxM tensor X that specifies the height of each of the bars. If X contains M columns, the values corresponding to each row are either stacked or grouped (depending on how opts.stacked is set). In addition to X, an (optional) N tensor Y can be specified that contains the corresponding x-axis values.

The following plot-specific opts are currently supported:

  • opts.rownames: table containing x-axis labels
  • opts.stacked : stack multiple columns in X
  • opts.legend : table containing legend labels
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.histogram

This function draws a histogram of the specified data. It takes as input an N tensor X that specifies the data of which to construct the histogram.

The following plot-specific opts are currently supported:

  • opts.numbins: number of bins (number; default = 30)
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.boxplot

This function draws boxplots of the specified data. It takes as input an N or an NxM tensor X that specifies the N data values of which to construct the M boxplots.

The following plot-specific opts are currently supported:

  • opts.legend: labels for each of the columns in X
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.surf

This function draws a surface plot. It takes as input an NxM tensor X that specifies the value at each location in the surface plot.

The following opts are supported:

  • opts.colormap: colormap (string; default = 'Viridis')
  • opts.xmin : clip minimum value (number; default = X:min())
  • opts.xmax : clip maximum value (number; default = X:max())
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.contour

This function draws a contour plot. It takes as input an NxM tensor X that specifies the value at each location in the contour plot.

The following opts are supported:

  • opts.colormap: colormap (string; default = 'Viridis')
  • opts.xmin : clip minimum value (number; default = X:min())
  • opts.xmax : clip maximum value (number; default = X:max())
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.quiver

This function draws a quiver plot in which the direction and length of the arrows is determined by the NxM tensors X and Y. Two optional NxM tensors gridX and gridY can be provided that specify the offsets of the arrows; by default, the arrows will be done on a regular grid.

The following opts are supported:

  • opts.normalize: length of longest arrows (number)
  • opts.arrowheads: show arrow heads (boolean; default = true)
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.mesh

This function draws a mesh plot from a set of vertices defined in an Nx2 or Nx3 matrix X, and polygons defined in an optional Mx2 or Mx3 matrix Y.

The following opts are supported:

  • opts.color: color (string)
  • opts.opacity: opacity of polygons (number between 0 and 1)
  • opts.layoutopts : dict of any additional options that the graph backend accepts for a layout. For example layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}.

vis.dual_axis_lines

This function will create a line plot using plotly with different Y-Axis.

X = A numpy array of the range.

Y1 = A numpy array of the same count as X.

Y2 = A numpy array of the same count as X.

The following opts are supported:

  • opts.height : Height of the plot
  • opts.width : Width of the plot
  • opts.name_y1 : Axis name for Y1 plot
  • opts.name_y2 : Axis name for Y2 plot
  • opts.title : Title of the plot
  • opts.color_title_y1 : Color of the Y1 axis Title
  • opts.color_tick_y1 : Color of the Y1 axis Ticks
  • opts.color_title_y2 : Color of the Y2 axis Title
  • opts.color_tick_y2 : Color of the Y2 axis Ticks
  • opts.side : side on which the Y2 tick has to be placed. Has values 'right' or left.
  • opts.showlegend : Display legends (boolean values)
  • opts.top : Set the top margin of the plot
  • opts.bottom : Set the bottom margin of the plot
  • opts.right : Set the right margin of the plot
  • opts.left : Set the left margin of the plot

This is the image of the output:

Customizing plots

The plotting functions take an optional opts table as input that can be used to change (generic or plot-specific) properties of the plots.

All input arguments are specified in a single table; the input arguments are matches based on the keys they have in the input table.

The following opts are generic in the sense that they are the same for all visualizations (except plot.image, plot.text, plot.video, and plot.audio):

  • opts.title : figure title
  • opts.width : figure width
  • opts.height : figure height
  • opts.showlegend : show legend (true or false)
  • opts.xtype : type of x-axis ('linear' or 'log')
  • opts.xlabel : label of x-axis
  • opts.xtick : show ticks on x-axis (boolean)
  • opts.xtickmin : first tick on x-axis (number)
  • opts.xtickmax : last tick on x-axis (number)
  • opts.xtickvals : locations of ticks on x-axis (table of numbers)
  • opts.xticklabels : ticks labels on x-axis (table of strings)
  • opts.xtickstep : distances between ticks on x-axis (number)
  • opts.xtickfont : font for x-axis labels (dict of font information)
  • opts.ytype : type of y-axis ('linear' or 'log')
  • opts.ylabel : label of y-axis
  • opts.ytick : show ticks on y-axis (boolean)
  • opts.ytickmin : first tick on y-axis (number)
  • opts.ytickmax : last tick on y-axis (number)
  • opts.ytickvals : locations of ticks on y-axis (table of numbers)
  • opts.yticklabels : ticks labels on y-axis (table of strings)
  • opts.ytickstep : distances between ticks on y-axis (number)
  • opts.ytickfont : font for y-axis labels (dict of font information)
  • opts.marginleft : left margin (in pixels)
  • opts.marginright : right margin (in pixels)
  • opts.margintop : top margin (in pixels)
  • opts.marginbottom: bottom margin (in pixels)

opts are passed as dictionary in python scripts.You can pass opts like:

opts=dict(title="my title", xlabel="x axis",ylabel="y axis")

OR

opts={"title":"my title", "xlabel":"x axis","ylabel":"y axis"}

The other options are visualization-specific, and are described in the documentation of the functions.

Others

vis.close

This function closes a specific window. It takes input window id win and environment id eid. Use win as None to close all windows in an environment.

vis.delete_env

This function deletes a specified env entirely. It takes env id eid as input.

Note: delete_env is deletes all data for an environment and is IRREVERSIBLE. Do not use unless you absolutely want to remove an environment.

vis.fork_env

This function forks an environment, similiar to the UI feature.

Arguments:

  • prev_eid: Environment ID that we want to fork.
  • eid: New Environment ID that will be created with the fork.

Note: fork_env an exception will occur if an env that doesn't exist is forked.

vis.win_exists

This function returns a bool indicating whether or not a window win exists on the server already. Returns None if something went wrong.

Optional arguments:

  • env: Environment to search for the window in. Default is None.

vis.get_env_list

This function returns a list of all of the environments on the server at the time of calling. It takes no arguments.

vis.win_hash

This function returns md5 hash of the contents of a window win if it exists on the server. Returns None otherwise.

Optional arguments:

  • env : Environment to search for the window in. Default is None.

vis.get_window_data

This function returns the window data for the given window. Returns data for all windows in an env if win is None.

Arguments:

  • env: Environment to search for the window in.
  • win: Window to return data for. Set to None to retrieve all the windows in an environment.

vis.check_connection

This function returns a bool indicating whether or not the server is connected. It accepts an optional argument timeout_seconds for a number of seconds to wait for the server to come up.

vis.replay_log

This function takes the contents of a visdom log and replays them to the current server to restore a state or handle any missing entries.

Arguments:

  • log_filename: log file to replay the contents of.

License

visdom is Apache 2.0 licensed, as found in the LICENSE file.

Note on Lua Torch Support

Support for Lua Torch was deprecated following v0.1.8.4. If you'd like to use torch support, you'll need to download that release. You can follow the usage instructions there, but it is no longer officially supported.

Contributing

See guidelines for contributing here.

Acknowledgments

Visdom was inspired by tools like display and relies on Plotly as a plotting front-end.

Comments
  • visdom shows nothing

    visdom shows nothing

    I am very confused that I tried the demo.py but showed nothing at http://localhost:8097 The server has received the message but shows nothing, the web explorer only shows blue background, It has no other windows.

    y406539259@BILL-172:~$ python -m visdom.server It's Alive! INFO:tornado.access:304 GET / (127.0.0.1) 5.03ms INFO:tornado.access:304 GET / (::1) 3.56ms INFO:tornado.access:304 GET / (222.201.139.49) 3.57ms INFO:tornado.access:304 GET /favicon.png (222.201.139.49) 2.84ms INFO:tornado.access:200 POST /events (::1) 1.37ms INFO:tornado.access:200 POST /events (::1) 2.56ms INFO:tornado.access:200 POST /events (::1) 1.79ms INFO:tornado.access:200 POST /events (::1) 1.20ms INFO:tornado.access:200 POST /events (::1) 0.79ms INFO:tornado.access:200 POST /events (::1) 1.08ms INFO:tornado.access:200 POST /events (::1) 1.69ms INFO:tornado.access:200 POST /events (::1) 1.47ms INFO:tornado.access:200 POST /update (::1) 1.51ms INFO:tornado.access:200 POST /events (::1) 1.01ms INFO:tornado.access:200 POST /events (::1) 0.99ms INFO:tornado.access:200 POST /events (::1) 0.91ms INFO:tornado.access:200 POST /events (::1) 0.69ms INFO:tornado.access:200 POST /events (::1) 0.60ms INFO:tornado.access:200 POST /events (::1) 9.94ms INFO:tornado.access:200 POST /events (::1) 6.87ms INFO:tornado.access:200 POST /events (::1) 1.26ms INFO:tornado.access:200 POST /events (::1) 0.92ms INFO:tornado.access:200 POST /events (::1) 0.71ms INFO:tornado.access:200 POST /update (::1) 0.89ms INFO:tornado.access:200 POST /update (::1) 0.62ms INFO:tornado.access:200 POST /update (::1) 1.09ms INFO:tornado.access:200 POST /events (::1) 1.12ms INFO:tornado.access:200 POST /events (::1) 0.92ms INFO:tornado.access:200 POST /events (::1) 1.33ms INFO:tornado.access:200 POST /events (::1) 0.60ms INFO:tornado.access:200 POST /events (::1) 0.61ms INFO:tornado.access:200 POST /events (::1) 0.65ms INFO:tornado.access:200 POST /close (::1) 0.78ms INFO:tornado.access:200 POST /events (::1) 0.67ms INFO:tornado.access:304 GET / (::1) 3.81ms INFO:tornado.access:304 GET / (127.0.0.1) 2.62ms INFO:tornado.access:304 GET / (222.201.139.49) 3.58ms INFO:tornado.access:304 GET /favicon.png (222.201.139.49) 3.68ms INFO:tornado.access:304 GET / (222.201.139.49) 3.55ms INFO:tornado.access:200 GET /favicon.png (222.201.139.49) 3.33ms INFO:tornado.access:304 GET / (127.0.0.1) 3.01ms INFO:tornado.access:304 GET / (127.0.0.1) 3.74ms INFO:tornado.access:304 GET / (::1) 3.33ms INFO:tornado.access:304 GET / (127.0.0.1) 3.35ms

    opened by y406539259 30
  • Feature: Compare Environments

    Feature: Compare Environments

    • Added react component rc-tree-select which allows for searching and filtering through environments in dropdown
    • Multiple environments can be selected to result in a comparison in plots with the same title (a legend is automatically created indexing the selected environments) [Note I have whited out some of the environment names]
    compare
    • The rc-tree-select is populated hierarchically by splitting according to the first underscore. This allows for some organization of environments and projects. [Note: I have whited out some of the environment names]
    treeselect CLA Signed 
    opened by pareshmg 28
  • [Core Improvement] Reign in the amount of content sent to the frontend client when things are updated.

    [Core Improvement] Reign in the amount of content sent to the frontend client when things are updated.

    Noted in #393, a lot of data gets sent to the client as an environment grows. As seen in #386, this is not a sustainable practice. Moving forward we'll need to be able to send update packets from the server rather than the entire contents of an environment's json every time a window in that json gets updated. The client should only request the complete contents when the environment changes or if an inconsistency is detected (can be done using a hash of the stored data).

    enhancement 0.2.1 
    opened by JackUrb 26
  • Proxy problem

    Proxy problem

    In python code I tried to set proxy settings/ vis = visdom.Visdom(proxy=' ') Then I tried to download js libs locally and see this error.

    WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips. MathJax.js:32:5 Ошибка карты кода: request failed with status 404 URL ресурса: http://127.0.0.1:8097/static/fonts/layout_bin_packer?v=6c46683ed70fbb1443caf3531243836d URL карты кода: layout-bin-packer.js.map [Подробнее] Ошибка карты кода: request failed with status 404 URL ресурса: http://127.0.0.1:8097/static/js/react-grid-layout.min.js?v=062d847cc21a7fc3df5557aa91b4dbf5 URL карты кода: react-grid-layout.min.js.map [Подробнее] Ошибка карты кода: request failed with status 404 URL ресурса: https://unpkg.com/[email protected] URL карты кода: layout-bin-packer.js.map [Подробнее] Ошибка карты кода: request failed with status 404 URL ресурса: http://127.0.0.1:8097/static/css/bootstrap.min.css?v=ec3bb52a00e176a7181d454dffaea219 URL карты кода: bootstrap.min.css.map

    What I must do to solve the problem?

    opened by Gerkam 26
  • urlopen error when

    urlopen error when "python -m visdom.server"

    Hello, I updated visdom by "pip install --upgrade visdom" . The visdom of old version can be started successful but nothing appeared in localhost::8097 , similar problem to the issue "no res the pane" .So I update the visdom while an error below occurred when i run "python -m visdom.server". (And I have not used the proxy.)Pleas help me..

    ############################################ Traceback (most recent call last): File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 1254, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 1106, in request self._send_request(method, url, body, headers) File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 1151, in _send_request self.endheaders(body) File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 1102, in endheaders self._send_output(message_body) File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 934, in _send_output self.send(msg) File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 877, in send self.connect() File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 1252, in connect super().connect() File "/home/dou/anaconda3_pytorch/lib/python3.5/http/client.py", line 849, in connect (self.host,self.port), self.timeout, self.source_address) File "/home/dou/anaconda3_pytorch/lib/python3.5/socket.py", line 711, in create_connection raise err File "/home/dou/anaconda3_pytorch/lib/python3.5/socket.py", line 702, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/dou/anaconda3_pytorch/lib/python3.5/site-packages/visdom/server.py", line 615, in download_scripts data = opener.open(req).read() File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 466, in open response = self._open(req, data) File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 484, in _open '_open', req) File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(*args) File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 1297, in https_open context=self._context, check_hostname=self._check_hostname) File "/home/dou/anaconda3_pytorch/lib/python3.5/urllib/request.py", line 1256, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/home/dou/anaconda3_pytorch/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/home/dou/anaconda3_pytorch/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/dou/anaconda3_pytorch/lib/python3.5/site-packages/visdom/server.py", line 636, in download_scripts() File "/home/dou/anaconda3_pytorch/lib/python3.5/site-packages/visdom/server.py", line 619, in download_scripts logging.error('Error {} while downloading {}'.format(exc.code, key)) AttributeError: 'URLError' object has no attribute 'code' ##############################################

    opened by douhaoexia 26
  • can not connect to visdom server On Linux

    can not connect to visdom server On Linux

    I have installed visdom python package on my Linux system After starting the visdom server, I can not open the page localhost:8097. I have tried to add LocalForward 127.0.0.1:8097 127.0.0.1:8097 to ~/.ssh/config, but it does not help either. I have also tried to install visdom on my Windows computer, and it works fine.

    Any idea how to fix this?

    opened by jdhao 25
  • Connection timed out : when using python -m visdom.server

    Connection timed out : when using python -m visdom.server

    Hi, when I use python -m visdom.server to start visdom server, I got Connection timed out error as following: `Traceback (most recent call last): File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 1318, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 1026, in _send_output self.send(msg) File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 964, in send self.connect() File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 1392, in connect super().connect() File "/root/anaconda2/envs/gtn_env/lib/python3.6/http/client.py", line 936, in connect (self.host,self.port), self.timeout, self.source_address) File "/root/anaconda2/envs/gtn_env/lib/python3.6/socket.py", line 722, in create_connection raise err File "/root/anaconda2/envs/gtn_env/lib/python3.6/socket.py", line 713, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py", line 615, in download_scripts data = opener.open(req).read() File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "/root/anaconda2/envs/gtn_env/lib/python3.6/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/root/anaconda2/envs/gtn_env/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/root/anaconda2/envs/gtn_env/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py", line 636, in download_scripts() File "/root/anaconda2/envs/gtn_env/lib/python3.6/site-packages/visdom/server.py", line 619, in download_scripts logging.error('Error {} while downloading {}'.format(exc.code, key)) AttributeError: 'URLError' object has no attribute 'code' ` I am a new one for pytorch and visdom. I would like to use visdom for visualization. I use anaconda2, python3.6 as default setting. What should I do? Thanks a lot !

    opened by huoliangyu 18
  • [Big change] Server refactor (Part 1)

    [Big change] Server refactor (Part 1)

    Description

    There has already been done lots of work regarding the refactoring and restructuring of the server code (see #675). The goal of this PR is to merge these changes with the current server version to make room for further improvements on top of that. And most importantly: not loosing work in the long-run that has already been done.

    (Note: Even though I tagged this PR as "Part 1", the changes suggested are still fully functional).

    To accomplish the merge of #675

    1. First, I basically cherry-picked the commits containing the actual work (i.e. excluding the merge-commits). This has the side-effect that the original contribution is maintained in the logs.
    2. Then I've added revert-commits on top of that to essentially create a non-OP on-top of master.
    3. After that, I reapplied the refactoring applied in #675 and saved the changes as a new commit named reapply all changes since server refactor.
    4. Squashing that commit with the revert-commit basically results in a rebase of master onto #675.
      (The other way round would be possible as well, but I felt this was easier in this case).

    Some minor changes on the way:

    • changed the method get_visdom_path to use importlib instead of inspect to get the actual file name of static files. (I found the previous version could have caching-problems with static files during development if I remember correctly).
    • Moved LAYOUT_FILE and MAX_SOCKET_WAIT to defaults.py (to match its location to that of the other global uppercased config variables).
    • Changed wildcard imports (from X import * to specific imports).

    Note: I needed to add a change in the github workflow just for this PR: As the file structure changed (the executable python file is py/visdom/server instead of py/visdom/server.py), the startup of the server would not work anymore for the "init"-stage of the cypress tests.
    This (last) commit can basically be reverted after or removed before the merge.

    How Has This Been Tested?

    Just did a short test myself using the demo + tested against default cypress integration tests.

    Types of changes

    • [x] Refactor
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Checklist:

    • [x] I adapted the version number under py/visdom/VERSION according to Semantic Versioning Changed from 0.2.1 to 0.2.2.
    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by da-h 14
  • Testing using cypress

    Testing using cypress

    Description

    This PR implements a baseline for automated testing of visdom using cypress.

    Motivation and Context

    Following the discussion in #849, this PR introduces some basic tests for many features of visdom.

    In more detail:

    • As basic setup tests, there are tests for
      • for the connection to the server
      • the possibilty to reconnect using the ui
      • the env / tree selection bar (does it open correctly, can we (de)select environment & clear everything)
    • All Pane-Types (except the EmbeddingPane) are tested. The implemented tests are
      • Showing one ore more windows of the same example (to test repeatability)
      • Drag & drop- rearrangement of all pane types on the visdom dashboard
      • Resizing of panes & resetting the size using double-click
      • Closing of paness
    • Basic filtering function tests for the regex-filter field
    • Image Pane tests:
      • movement tests using mouse-drag or mouse-wheel
      • zoom using ctrl + wheel
      • reset of the viewpoint using double-click
      • download-button test
      • image history functionality with a slider
      • image grid functionality
    • All examples from demo.py have been split into seperate files and functions to enable triggering them seperately. There is a test for each example.
      • For most plots and many other examples, there are visual regression tests that compare the screenshots of the output before & after any code change.
    • Callback tests
      • properties with callbacks
      • image callbacks including mouse- & key-presses
      • text callbacks

    Additionally:

    • I found some bugs during the creation of the tests. (Comments in code). I will submit issues for anyone interested solving these.
    • Added a data-cy-attribute to the filter input field to better match it in the test
    • fixed a missing import in js/PropertiesPane.js
    • adapted CONTRIBUTING.md and PULL_REQUEST_TEMPLATE.md to show the use of the new commands

    How Has This Been Tested?

    Who tests the tester? ;)

    If you want to try it, do:

    1. start a visdom server on port 8098
    2. run npm run test:gui
    3. click on screenshots.init.js (otherwise the visual regression tests in screenshots.js will fail)

    Screenshots (if appropriate):

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Checklist:

    • [x] My code follows the code style of this project.
    • [x] My change requires a change to the documentation.
    • [x] I have updated the documentation accordingly.
    • [x] I have tested the changes using npm test. (Please check the CONTRIBUTING.MD file for details.)
    opened by da-h 14
  • TypeError: Object of type Tensor is not JSON serializable

    TypeError: Object of type Tensor is not JSON serializable

    Bug Description **When trying to train my model and show the process,I found that the process of train is OK,but it shows that 'TypeError: Object of type Tensor is not JSON serializable' like this.And the visdom didn't work.

    Traceback (most recent call last): File "main.py", line 354, in fire.Fire() File "/home/lyz/anaconda3/lib/python3.7/site-packages/fire/core.py", line 127, in Fire component_trace = _Fire(component, args, context, name) File "/home/lyz/anaconda3/lib/python3.7/site-packages/fire/core.py", line 366, in _Fire component, remaining_args) File "/home/lyz/anaconda3/lib/python3.7/site-packages/fire/core.py", line 542, in _CallCallable result = fn(*varargs, **kwargs) File "main.py", line 198, in train 'val_acc':val_acc.value()[0]},win_name = 'Acc') File "/home/lyz/project/awesome_face_antispoofing/utils/Visualizer.py", line 67, in plot_many_stack update=None if x == 0 else 'append' File "/home/lyz/anaconda3/lib/python3.7/site-packages/visdom/init.py", line 335, in wrapped_f return f(*args, **kwargs) File "/home/lyz/anaconda3/lib/python3.7/site-packages/visdom/init.py", line 1367, in line update=update, name=name) File "/home/lyz/anaconda3/lib/python3.7/site-packages/visdom/init.py", line 335, in wrapped_f return f(*args, **kwargs) File "/home/lyz/anaconda3/lib/python3.7/site-packages/visdom/init.py", line 1292, in scatter return self._send(data_to_send, endpoint=endpoint) File "/home/lyz/anaconda3/lib/python3.7/site-packages/visdom/init.py", line 548, in _send data=json.dumps(msg), File "/home/lyz/anaconda3/lib/python3.7/json/init.py", line 231, in dumps return _default_encoder.encode(obj) File "/home/lyz/anaconda3/lib/python3.7/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/home/lyz/anaconda3/lib/python3.7/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/home/lyz/anaconda3/lib/python3.7/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.class.name} ' TypeError: Object of type Tensor is not JSON serializable

    while my Pytorch is 1.0.0.Any advice will be greatful,thanks in advance.

    opened by liuyazhou951218 14
  • ERROR:visdom:failed CONNECT via proxy status: 403

    ERROR:visdom:failed CONNECT via proxy status: 403

    When I run the code:

    import visdom import numpy as np vis = visdom.Visdom(server='http://10.8.0.1/', port=8080) #visdom.Visdom(use_incoming_socket=False) #vis = visdom.Visdom() vis.text('Hello, world!') vis.image(np.ones((3, 10, 10))) #################################################################

    Ouput on terminal:

    WARNING:root:Setting up a new session... ERROR:visdom:failed CONNECT via proxy status: 403 ERROR:visdom:failed CONNECT via proxy status: 403 ERROR:visdom:failed CONNECT via proxy status: 403 WARNING:visdom:Visdom python client failed to establish socket to get messages from the server. This feature is optional and can be disabled by initializing Visdom with use_incoming_socket=False, which will prevent waiting for this request to timeout. ######################################################### How to fix this proxy problem and what are the commands for using visdom since I am using firefox of the same server as a screen for visualization?

    opened by chandrakant-sonawane 14
  • Style.css file not found

    Style.css file not found

    Hey Fossasia, thanks for your great work. I have the following issue:

    python -m visdom.server Checking for scripts. It's Alive! ERROR:root:initializing INFO:root:Application Started INFO:root:Working directory: C:\Users\olive.visdom You can navigate to http://localhost:8097/ INFO:tornado.access:304 GET / (::1) 30.08ms INFO:tornado.access:304 GET /user/style.css?v=311c1a25a99ac897d22df72ea024df452eee92fdc1453817050a243b62106e375c791d4f9b831ec371f6f342f84fd41d05bcc29d7835ec2bb78a150ba90282d1 (::1) 1.00ms INFO:tornado.access:304 GET /static/fonts/glyphicons-halflings-regular.woff2 (::1) 284.73ms INFO:tornado.access:304 GET / (::1) 72.16ms INFO:tornado.access:304 GET /user/style.css?v=311c1a25a99ac897d22df72ea024df452eee92fdc1453817050a243b62106e375c791d4f9b831ec371f6f342f84fd41d05bcc29d7835ec2bb78a150ba90282d1 (::1) 1.02ms INFO:tornado.access:101 GET /socket (::1) 0.00ms INFO:root:Opened new socket from ip: ::1 INFO:tornado.access:200 POST /env/main (::1) 1.00ms INFO:tornado.access:200 POST /env/main (::1) 0.00ms INFO:tornado.access:304 GET /favicon.png (::1) 14.04ms

    I have gone to the file directory where visdom is saved in the environment and manually created a user\style.css file. I am not sure what code to include in the style.css. I couldn't fix the problem (I have also deleted and reinstalled visdom. It doesn't give me the user\style.css files.

    opened by MayuO2 1
  • Cypress Tests for -use_frontend_client_polling variant of visdom

    Cypress Tests for -use_frontend_client_polling variant of visdom

    Description

    Ensuring functionality also using the -use_frontend_client_polling flag.

    Motivation and Context

    Regarding the recent proxy-users and an upcoming code simplification of the server socket handlers, I suggest to add some testing of the polling-feature. I have explicitly only added the "functional tests" to be tested against the -use_frontend_client_polling flag, which I though should be sufficient.

    In addition, a few minor changes were necessary in the following test cases:

    • the ImagePane tests image_callback and image_callback2 failed now and then for the poller-implementation, but not for the websocket implementation. This was due to two windows being loaded in different orders in both implementation. (The image-panes load slower when using long polling). This PR solves this by adapting all cypress selectors for image panes to use a "pane with an Image" instead of the "first" pane in the list of panes.
    • The test for the view modal did not work due to a similar problem: the image pane loaded slower for the poller-implementation. For sake of consistency, I've added wait(500) commands in between the respective pane-creation commands.
    • The text_callback test failed randomly as well. This is probably due to too a missing order-enforcement of the events when passing incoming events to the callback. (Not sure here. Is this correct?). This PR increases the delay in-between callback keystrokes to 200ms (from previously 50ms) to solve the issue of inconsistent tests.

    How Has This Been Tested?

    Testing using this very PR-action, which should already include the test. Also, to test for consistency, I've triggered the exact same action onto 10 branches, see for instance here

    Types of changes

    • [x] Test cases
    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Code refactor or cleanup (changes to existing code for improved readability or performance)

    Checklist:

    • [ ] I adapted the version number under py/visdom/VERSION according to Semantic Versioning
    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by da-h 0
  • Use visdom in Jupyter

    Use visdom in Jupyter

    Bug Description When i use visdom in jupyter, I can not get the result on the visdom panel, and get ssome error info.

    Reproduction Steps Enter steps to reproduce the behavior:

    1. I opened visdom server on my Ubantu server with 'python -m visdom.server -p 6006'
    2. In jupyter notebook: 'import visdom; viz=visdom.Visdom(port=6006)' and the server says 'INFO:root:Opened visdom socket from ip: 127.0.0.1' at the same time.
    3. In jupyter notebook:‘viz.text('Hello, world!')’ but i can not get this text in visdom panel, but get some error info. visdom_error

    Expected behavior I should get the text in visdom panel, but it doesn't make any change. image

    Screenshots If applicable, add screenshots to help explain your problem.

    Client logs: the jupyter returns '\n\n\n\n\n\n500 Unable to connect\n\n\n\n\n\n

    Unable to connect

    \n\n

    Tinyproxy was unable to connect to the remote web server.

    \n\n
    \n\n

    Generated by tinyproxy version 1.10.0.

    \n\n\n\n\n'

    Server logs: Nothing reported by visdom.server and changed in visdom panel.

    opened by SmILeel 2
  • fixed issue where large image would render in different env

    fixed issue where large image would render in different env

    Updated the backend to send the environment ID with the render information.

    Updated the Front End to ignore the incoming window when it is not in the currently selected environment

    Motivation and Context

    issue #80

    Types of changes

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Code refactor or cleanup (changes to existing code for improved readability or performance)

    Checklist:

    • [ ] I adapted the version number under py/visdom/VERSION according to Semantic Versioning
    • [x] My code follows the code style of this project.
    • [ ] My change requires a change to the documentation.
    • [ ] I have updated the documentation accordingly.
    opened by Aryanamish 5
  • Removing Envs is buggy

    Removing Envs is buggy

    Bug Description

    1. When removing an env in the "Environment Management Modal" visdom will crash if the env has not been saved explicitly.
    2. Removing an active env results in a state where no env is selected, but all windows of the removed env are still visible.

    As a side note: One could put the os.remove into a try/catch-block, but with the second issue above, it seems this should be caught before that. Possibly there is a flag missing somewhere in the call chain that specifies if the env actually exists as a file or only in memory.

    Reproduction Steps See #886: The test cypress/integration/modal.js contains two TODOs that reproduce those issues repeatable.

    Expected behavior All windows should be cleared when removing the active env, also the visdom client should not crash when closing any env.

    Server logs:

    
    INFO:tornado.access:200 POST /env/text_fork_561637 (127.0.0.1) 0.72ms
    INFO:root:from web client: {"cmd":"delete_env","prev_eid":"text_fork_561637","eid":"text_fork_561637_fork"}
    INFO:root:closing environment text_fork_561637_fork
    INFO:root:from web client: {"cmd":"delete_env","prev_eid":"text_fork_561637","eid":"text_fork_561637"}
    INFO:root:closing environment text_fork_561637
    ERROR:tornado.application:Uncaught exception GET /socket (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8098', method='GET', uri='/socket', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/da-h/.pyenv/versions/3.8.13/lib/python3.8/site-packages/tornado/websocket.py", line 635, in _run_callback
        result = callback(*args, **kwargs)
      File "/home/da-h/Projects/visdom/py/visdom/server/handlers/socket_handlers.py", line 264, in on_message
        os.remove(p)
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/testdir/text_fork_561637.json'
    
    opened by da-h 0
  • Error: root initializing-- Visdom does not show graphs, only has a weird blank table

    Error: root initializing-- Visdom does not show graphs, only has a weird blank table

    Bug Description

    after initializing visdom using python -m visdom.server -port ${port} --hostname ${node} ERROR:root:initializing INFO:root:Application Started INFO:root:Working directory: /gpfs/scratch/fanj06/visdom_cache

    Reproduction Steps Enter steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    Expected behavior Give a clear and concise description of what you expected to happen.

    Screenshots Screen Shot 2022-10-23 at 4 45 03 AM Client logs: For issues that make it to the point of reaching the frontend in a browser, please include the javascript logs from that browser. In Chrome, javascript logs can be found via View -> Developer -> JavaScript Console.

    Server logs: ERROR:root:initializing INFO:root:Application Started INFO:root:Working directory: /gpfs/scratch/fanj06/visdom_cache INFO:tornado.access:200 POST /env/main (192.168.0.92) 1.01ms INFO:tornado.access:101 GET /vis_socket (192.168.0.92) 0.59ms INFO:root:Opened visdom socket from ip: 192.168.0.92 INFO:tornado.access:200 POST /events (192.168.0.92) 0.57ms INFO:tornado.access:200 POST /events (192.168.0.92) 0.40ms INFO:tornado.access:200 POST /events (192.168.0.92) 0.35ms INFO:tornado.access:200 POST /events (192.168.0.92) 0.53ms INFO:tornado.access:200 POST /win_exists (192.168.0.92) 0.48ms INFO:tornado.access:200 POST /update (192.168.0.92) 1.80ms INFO:tornado.access:200 POST /win_exists (192.168.0.92) 0.32ms INFO:tornado.access:200 POST /update (192.168.0.92) 1.29ms INFO:tornado.access:200 POST /events (192.168.0.92) 0.36ms INFO:tornado.access:200 POST /events (192.168.0.92) 0.94ms

    Additional context Add any other context about the problem here. (like proxy settings, network setup, overall goals, etc.)

    opened by DakotaFan 1
Releases(v0.2.3)
Owner
FOSSASIA
Open Technologies developed in Asia and Around the Globe
FOSSASIA
Simple implementation of Self Organizing Maps (SOMs) with rectangular and hexagonal grid topologies

py-self-organizing-map Simple implementation of Self Organizing Maps (SOMs) with rectangular and hexagonal grid topologies. A SOM is a simple unsuperv

Jonas Grebe 1 Feb 10, 2022
A Python Library for Self Organizing Map (SOM)

SOMPY A Python Library for Self Organizing Map (SOM) As much as possible, the structure of SOM is similar to somtoolbox in Matlab. It has the followin

Vahid Moosavi 497 Dec 29, 2022
Implementation of SOMs (Self-Organizing Maps) with neighborhood-based map topologies.

py-self-organizing-maps Simple implementation of self-organizing maps (SOMs) A SOM is an unsupervised method for learning a mapping from a discrete ne

Jonas Grebe 6 Nov 22, 2022
These data visualizations were created for my introductory computer science course using Python

Homework 2: Matplotlib and Data Visualization Overview These data visualizations were created for my introductory computer science course using Python

Sophia Huang 12 Oct 20, 2022
These data visualizations were created as homework for my CS40 class. I hope you enjoy!

Data Visualizations These data visualizations were created as homework for my CS40 class. I hope you enjoy! Nobel Laureates by their Country of Birth

null 9 Sep 2, 2022
Data aggregated from the reports found at the MCPS COVID Dashboard into a set of visualizations.

Montgomery County Public Schools COVID-19 Visualizer Contents About this project Data Support this project About this project Data All data we use can

James 3 Jan 19, 2022
Parallel t-SNE implementation with Python and Torch wrappers.

Multicore t-SNE This is a multicore modification of Barnes-Hut t-SNE by L. Van der Maaten with python and Torch CFFI-based wrappers. This code also wo

Dmitry Ulyanov 1.7k Jan 9, 2023
Parallel t-SNE implementation with Python and Torch wrappers.

Multicore t-SNE This is a multicore modification of Barnes-Hut t-SNE by L. Van der Maaten with python and Torch CFFI-based wrappers. This code also wo

Dmitry Ulyanov 1.5k Feb 17, 2021
A collection of 100 Deep Learning images and visualizations

A collection of Deep Learning images and visualizations. The project has been developed by the AI Summer team and currently contains almost 100 images.

AI Summer 65 Sep 12, 2022
📊📈 Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)

???? Serves up Pandas dataframes via the Django REST Framework for use in client-side (i.e. d3.js) visualizations and offline analysis (e.g. Excel)

wq framework 1.2k Jan 1, 2023
Generate visualizations of GitHub user and repository statistics using GitHub Actions.

GitHub Stats Visualization Generate visualizations of GitHub user and repository statistics using GitHub Actions. This project is currently a work-in-

JoelImgu 3 Dec 14, 2022
A Python package for caclulations and visualizations in geological sciences.

geo_calcs A Python package for caclulations and visualizations in geological sciences. Free software: MIT license Documentation: https://geo-calcs.rea

Drew Heasman 1 Jul 12, 2022
Standardized plots and visualizations in Python

Standardized plots and visualizations in Python pltviz is a Python package for standardized visualization. Routine and novel plotting approaches are f

Andrew Tavis McAllister 0 Jul 9, 2022
Generate visualizations of GitHub user and repository statistics using GitHub Actions.

GitHub Stats Visualization Generate visualizations of GitHub user and repository statistics using GitHub Actions. This project is currently a work-in-

Aditya Thakekar 1 Jan 11, 2022
Visualizations for machine learning datasets

Introduction The facets project contains two visualizations for understanding and analyzing machine learning datasets: Facets Overview and Facets Dive

PAIR code 7.1k Jan 7, 2023
Visualizations for machine learning datasets

Introduction The facets project contains two visualizations for understanding and analyzing machine learning datasets: Facets Overview and Facets Dive

PAIR code 6.5k Feb 17, 2021
Visualizations of linear algebra algorithms for people who want a deep understanding

Visualising algorithms on symmetric matrices Examples QR algorithm and LR algorithm Here, we have a GIF animation of an interactive visualisation of t

ogogmad 3 May 5, 2022
GitHub Stats Visualizations : Transparent

GitHub Stats Visualizations : Transparent Generate visualizations of GitHub user and repository statistics using GitHub Actions. ⚠️ Disclaimer The pro

YuanYap 7 Apr 5, 2022
Glue is a python project to link visualizations of scientific datasets across many files.

Glue Glue is a python project to link visualizations of scientific datasets across many files. Click on the image for a quick demo: Features Interacti

null 675 Dec 9, 2022