lenses
Viewers (lenses) for Spotlight inspector widget.
For usage examples, see renumics.spotlight.layout.inspector
.
Functions​
lens(internal_type, columns, name=None, settings=None)
​
Add a viewer to Spotlight inspector widget.
internal_type
should be set exactly as expected if the frontend. For
supported lens types and respective column types, see Lens
class.
Prefer to use explicit lens functions defined below.
scalar(column, name=None)
​
Add scalar value viewer to Spotlight inspector widget.
Supports a single column of type bool
, int
, float
, str
,
datetime.datetime
or spotlight.Category
.
text(column, name=None)
​
Add text viewer to Spotlight inspector widget.
Supports a single column of type str
.
html(column, name=None, unsafe=False)
​
Add HTML viewer to Spotlight inspector widget.
Supports a single column of type str
.
markdown(column, name=None)
​
Add markdown viewer to Spotlight inspector widget.
Supports a single column of type str
.
array(column, name=None)
​
Add array viewer to Spotlight inspector widget.
Supports a single column of type np.ndarray
, spotlight.Embedding
or
spotlight.Window
.
sequences(columns, name=None, *, multiple_y_axes=False)
​
Add sequence viewer to Spotlight inspector widget.
Supports one or multiple columns of type spotlight.Sequence1D
.
mesh(column, name=None, *, color_attribute=None, wireframe=False, transparency=0, animation='loop', animation_scale=1.0, synchronize=True)
​
Add mesh viewer to Spotlight inspector widget.
Supports a single column of type spotlight.Mesh
.
image(column, name=None)
​
Add image viewer to Spotlight inspector widget.
Supports a single column of type spotlight.Image
.
video(column, name=None)
​
Add video viewer to Spotlight inspector widget.
Supports a single column of type spotlight.Video
.
audio(column, window_column=None, name=None, *, repeat=False, autoplay=False)
​
Add audio viewer to Spotlight inspector widget.
Supports a single column of type spotlight.Audio
with optional second
column of type spotlight.Window
.
spectrogram(column, window_column=None, name=None, *, frequency_scale='linear', amplitude_scale='decibel')
​
Add audio spectrogram viewer to Spotlight inspector widget.
Supports a single column of type spotlight.Audio
with optional second
column of type spotlight.Window
.
rouge_score(column, reference_column, name=None)
​
Add ROUGE score viewer to Spotlight inspector widget.
Supports a pair of string columns.
Classes​
Lens(**data)
​
Inspector lens configuration model.
Following combinations of lens types and column types are supported by
default (but can be further extended):
"ScalarView": single column of type bool
, int
, float
, str
,
datetime.datetime
or spotlight.Category
"TextLens": single column of type str
"HtmlLens": single column of type str
"SafeHtmlLens": single column of type str
"MarkdownLens": single column of type str
"ArrayLens": single column of type np.ndarray
,
spotlight.Embedding
or spotlight.Window
"SequenceView": single or multiple columns of type spotlight.Sequence1D
"MeshView": single column of type spotlight.Mesh
"ImageView": single column of type spotlight.Image
"VideoView": single column of type spotlight.Video
"AudioView": single column of type spotlight.Audio
, optional
single column of type spotlight.Window
"SpectrogramView": single column of type spotlight.Audio
, optional
single column of type spotlight.Window
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError
][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
__init__
uses __pydantic_self__
instead of the more common self
for the first arg to
allow self
as a field name.