Skip to content

Allow for more data input types and structures #1986

@djhoese

Description

@djhoese

The Problem

Delayed data loading is becoming more and more necessary as datasets grow larger and have to be accessed from remote storage (S3, etc). Projects like dask (and the communities that use it) make it easy to do parallel data processing and have made the idea of chunked/tiled asynchronous data very popular and useful. The efforts by the dask and numpy communities have resulted in a more defined specification for array subclasses (https://numpy.org/doc/stable/reference/arrays.classes.html#numpy.class.__array_function__) that have benefited dask, xarray, cupy, zarr, and many other libraries.

The problem is VisPy can still only naively use contiguous in-memory numpy arrays (ok, fine, memory maps are technically not in-memory) that it sends to the GPU. VisPy could be a huge resource for these various libraries if we could allow more generic access to the data they represent. For example, a tiled image source being provided to an ImageVisual and pushing the data to the GPU when it is ready or when it is viewed. Or a large complicated dask computation being performed on a cluster and being passed to a VolumeVisual or ImageVisual or MeshVisual and having the pieces show up in the visualization once they are done computing. Or a CuPy computation (maybe even being managed by dask) that can run on the GPU and then immediately draw that data with VisPy; no copy to CPU (see #1985).

The Options

If any of this stuff is possible already, let's get some examples or at least add information to the sphinx docs about projects that are doing these things (@codypiersall's vismap).

Other thoughts I've had are some kind of "data source" API/wrapper classes that can be passed to the various VisPy .set_data methods and allow Visuals to take advantage of these different data sources. I'm not sure if these data sources would have to manage a texture or buffer or if the Visual could tell the data source what it needs or allows.

CC @jni @codypiersall

Related:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions