tlc.schemas¶
Built-in schemas for describing 3LC table columns.
This package gathers the curated, user-facing schema classes. Power users authoring custom schemas should reach for
tlc.Schema directly. Scalar value descriptors (Int32Value, Float32Value, DimensionNumericValue,
StringValue, DictValue, …) live in the tlc.schemas.values submodule and are accessed as
tlc.schemas.values.Int32Value etc.
Modules and Packages¶
Module |
Description |
|---|---|
Scalar value descriptors used by |
Package Contents¶
Classes¶
Class |
Description |
|---|---|
Schema for boolean data. |
|
Variable-length list of categorical labels. Equivalent to |
|
Schema for a categorical label. |
|
Schema for a model confidence value in the |
|
Schema for datetime strings. Equivalent to |
|
Schema for neural-network embedding vectors. |
|
A schema for epoch values. |
|
A schema for example ID values. |
|
Schema for numpy arrays stored as one |
|
Schema for PyTorch tensors stored as one |
|
Variable-length 1D float32 array. Equivalent to |
|
Schema for float32 data. |
|
Schema for float64 data. |
|
A schema describing a value that identifies a foreign table. |
|
Schema for a float value in the |
|
Schema for image columns. One class, four behaviors via |
|
Schema for int16 data. |
|
Schema for int32 data. |
|
Schema for int64 data. |
|
Schema for int8 data. |
|
Schema for an intersection-over-union value in the |
|
A schema for iteration values. |
|
Defines a single item in a value map. |
|
Schema for a probability value in the |
|
A schema for sample weight values. |
|
Schema for semantic segmentation PIL Image data. |
|
Schema for string data. |
|
Schema for uint16 data. |
|
Schema for uint32 data. |
|
Schema for uint64 data. |
|
Schema for uint8 data. |
|
Schema for int64 Unix timestamps. |
|
Schema for URL strings. |
|
Schema for video URL references. |
API¶
- class BoolSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for boolean data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class CategoricalLabelListSchema(
- classes: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] | None = None,
- *,
- list_size: int | None = None,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._categorical_schemas.CategoricalLabelSchemaVariable-length list of categorical labels. Equivalent to
CategoricalLabelSchema(shape=(-1,)).- Parameters:
classes – Class labels. Accepts a list of names (0-indexed), a dict mapping numeric keys to names or MapElements, or a single class name string.
Noneor empty for no classes.list_size – Fixed list length.
Nonefor variable-length lists.display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class CategoricalLabelSchema(
- classes: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] | None = None,
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for a categorical label.
Values are stored as int32 with an associated class map. The
number_roleis always"label".- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
classes – Class labels. Accepts a list of names (0-indexed), a dict mapping numeric keys to names or MapElements, or a single class name string.
Noneor empty for no classes.shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class ConfidenceSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = False,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._metric_schemas.FractionSchemaSchema for a model confidence value in the
[0, 1]range.Bakes
number_role="fraction/confidence"for the Dashboard’s confidence color treatment.- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard. Defaults to
Falsesince metric values are typically computed.default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class DatetimeStringSchema(
- *,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._primitive_schemas.StringSchemaSchema for datetime strings. Equivalent to
StringSchema(string_role="Datetime").- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class EmbeddingSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = False,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._primitive_schemas.Float32SchemaSchema for neural-network embedding vectors.
Bakes
number_role="nn_embedding"(enables UMAP/dim-reduction hooks and hides the column in the Dashboard) andwritable=False.- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Embedding dimensions — e.g.
shape=512orshape=(512,).description – Column description.
writable – Whether the column is editable in the Dashboard. Defaults to
Falsesince embeddings are model outputs.default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class EpochSchema(
- *,
- display_name: str = 'Epoch',
- description: str = 'Epoch of training',
- display_importance: float | None = None,
Bases:
tlc.schemas._schema.SchemaA schema for epoch values.
Always non-writable since the epoch is recorded by the training loop and shouldn’t be edited by hand.
- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
display_importance – Ordering weight for column display (higher = more prominent).
Noneuses the default epoch display importance.
- class ExampleIdSchema(
- *,
- display_name: str = 'Example ID',
- description: str = '',
- writable: bool = False,
- computable: bool = False,
Bases:
tlc.schemas._schema.SchemaA schema for example ID values.
Example ID is a unique identifier for an example. It is used to identify examples across different tables. Defaults to
writable=Falsesince the ID is structural and shouldn’t be edited by hand.- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
writable – Whether the column is editable in the Dashboard.
computable – Whether the column is computable from other columns.
- class ExternalNumpyArraySchema(
- *,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- bulk_data_location: str | Url | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for numpy arrays stored as one
.npyfile per row.The row value is a URL pointing to the file. In sample view, values are converted to/from
numpy.ndarrayby loading the referenced file. Shape and dtype are determined by the stored file; for inline numpy sample view, useFloat32Schema(or another primitive) withsample_type="numpy_array".- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
bulk_data_location – URL override for bulk data storage.
- class ExternalTorchTensorSchema(
- *,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- bulk_data_location: str | Url | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for PyTorch tensors stored as one
.ptfile per row.The row value is a URL pointing to the file. In sample view, values are converted to/from
torch.Tensorby loading the referenced file. Shape and dtype are determined by the stored file; for inline torch sample view, useFloat32Schema(or another primitive) withsample_type="torch_tensor".- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
bulk_data_location – URL override for bulk data storage.
- class Float32ListSchema(
- *,
- list_size: int | None = None,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._primitive_schemas.Float32SchemaVariable-length 1D float32 array. Equivalent to
Float32Schema(shape=(-1,)).For roled list columns prefer the baked schema with a list shape (e.g.
ConfidenceSchema(shape=(-1,))) rather than constructing a raw float list.- Parameters:
list_size – Fixed list length.
Nonefor variable-length lists.display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Float32Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for float32 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions. Examples:shape=10(fixed list of 10),shape=(-1,)(variable list),shape=(-1, -1)(variable 2D).number_role – Escape hatch for UI roles without a baked schema. Prefer
EmbeddingSchemafor embeddings andFractionSchemafor[0, 1]values (fraction / confidence / probability / iou). Defaults to no role.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Float64Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for float64 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Float32Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class ForeignTableIdSchema( )¶
Bases:
tlc.schemas._schema.SchemaA schema describing a value that identifies a foreign table.
Always non-writable since the reference is part of the table’s structure, not user-editable data.
- Parameters:
foreign_table_url – URL of the foreign table this column references.
display_name – Display name for the mapped value. If empty, the Dashboard derives one from the URL.
- class FractionSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = False,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for a float value in the
[0, 1]range.Defaults to
writable=Falsesince metric values are typically computed, not authored. For semantically specialized variants with their own Dashboard color treatment, useConfidenceSchema,ProbabilitySchema, orIoUSchema.- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard. Defaults to
Falsesince metric values are typically computed.default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class ImageSchema(
- *,
- display_name: str = '',
- sample_type: Literal[pil_png, pil_jpeg, pil_webp, url] | None = 'pil_png',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- bulk_data_location: str | Url | None = None,
- metadata: dict[str, Any] | None = None,
- number_role_u: str | None = None,
- number_role_v: str | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for image columns. One class, four behaviors via
sample_type.Wire format is identical for all modes — a string URL pointing at an image file (
ImageUrlStringValue). What varies is what the column accepts on write and returns on read.sample_typeWrite input
Sample view returns
"pil_png"(default)PIL.Image or URL string
PIL.Image (load from URL)
"pil_jpeg"PIL.Image or URL string
PIL.Image
"pil_webp"PIL.Image or URL string
PIL.Image
"url"URL string
URL string (passthrough)
The three
pil_*variants differ only in the encoding used when externalizing in-memory PIL images to disk;load()is format-agnostic, so the read side is interchangeable. They also accept URL strings on write — already-stored images pass through verbatim, with no decode/re-encode. The"url"mode disables PIL handling entirely — both write and read are URL passthroughs — and is the schema for columns that reference pre-existing image files (e.g. an authored dataset).Example::
# PIL images serialized as PNG (default) ImageSchema() # PIL images serialized as JPEG ImageSchema(sample_type="pil_jpeg") # URL passthrough — pre-existing image files referenced by path ImageSchema(sample_type="url")
- Parameters:
display_name – Column display name in the Dashboard.
sample_type – Selects the column’s behavior. See the class docstring for the full table.
"pil_png"/"pil_jpeg"/"pil_webp"write PIL images to disk in the named format (and pass through URL strings unchanged)."url"is full URL passthrough — accepts and returns URL strings unchanged, with no PIL handling on either side.Noneis accepted as an alias for"url".description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
bulk_data_location – URL override for bulk data storage. Has no effect when
sample_type=None(no files are written in that mode).metadata – Arbitrary key-value metadata attached to this schema element.
number_role_u – Tag for the horizontal (U) axis. Image columns that share the same
number_role_u/number_role_vpair get linked cursor and zoom in the Dashboard, so panning or zooming one image moves the others in lockstep.number_role_v – Tag for the vertical (V) axis. See
number_role_u.
- class Int16Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for int16 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Int32Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for int32 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Int64Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for int64 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Int8Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for int8 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. Prefer
CategoricalLabelSchemafor label columns. Defaults to no role.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class IoUSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = False,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._metric_schemas.FractionSchemaSchema for an intersection-over-union value in the
[0, 1]range.Bakes
number_role="fraction/iou"for the Dashboard’s IoU color treatment.- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard. Defaults to
Falsesince metric values are typically computed.default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class IterationSchema(
- *,
- display_name: str = 'Iteration',
- description: str = 'The current iteration of the training process.',
- display_importance: float | None = None,
Bases:
tlc.schemas._schema.SchemaA schema for iteration values.
Always non-writable since the iteration is recorded by the training loop and shouldn’t be edited by hand.
- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
display_importance – Ordering weight for column display (higher = more prominent).
Noneuses the default iteration display importance.
- class MapElement(
- internal_name: str = '',
- *,
- display_name: str = '',
- description: str = '',
- display_color: str = '',
- url: str = '',
Bases:
dictDefines a single item in a value map.
Initialize self. See help(type(self)) for accurate signature.
- static from_any(
- any_map_element: Any,
Creates a MapElement object and populates it from an anonymous, possibly sparse object
- class ProbabilitySchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- description: str = '',
- writable: bool = False,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._metric_schemas.FractionSchemaSchema for a probability value in the
[0, 1]range.Bakes
number_role="fraction/probability"for the Dashboard’s probability color treatment.- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.description – Column description.
writable – Whether the column is editable in the Dashboard. Defaults to
Falsesince metric values are typically computed.default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class SampleWeightSchema(
- *,
- display_name: str = 'Weight',
- description: str = 'The weights of the samples in this table.',
- sample_type: str = 'hidden',
- default_value: float = 1.0,
Bases:
tlc.schemas._schema.SchemaA schema for sample weight values.
- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
sample_type – Override the sample type.
"hidden"hides the column from sample view.default_value – Default weight for new rows.
- class SemanticSegmentationSchema(
- *,
- display_name: str = '',
- classes: str | Sequence[str] | Sequence[dict[str, str]] | Sequence[MapElement] | dict[float, str] | dict[int, str] | dict[float, MapElement] | dict[int, MapElement] = (),
- sample_type: Literal[pil_png, pil_jpeg, pil_webp] = 'pil_png',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- bulk_data_location: str | Url | None = None,
- metadata: dict[str, Any] | None = None,
- number_role_u: str | None = None,
- number_role_v: str | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for semantic segmentation PIL Image data.
A single-channel PIL image containing a semantic segmentation mask where pixel values correspond to class labels. The class map is used as-is: if you want a background class at pixel value 0, include it explicitly in the class list or dict.
Example::
# Background at index 0, cat at 1, dog at 2 SemanticSegmentationSchema(classes=["background", "cat", "dog"]) # Equivalent using a dict SemanticSegmentationSchema(classes={0: "background", 1: "cat", 2: "dog"})- Parameters:
display_name – Column display name in the Dashboard.
classes – Class labels for segmentation. Accepts a list of class names (0-indexed), a dict mapping numeric keys to class names or MapElements, or a single class name string.
sample_type – File-encoding format.
"pil_png"(default) is lossless and supports palette/grayscale modes natively, which is usually what you want for segmentation masks."pil_jpeg"and"pil_webp"are available but lossy and may corrupt label values.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
bulk_data_location – URL override for bulk data storage.
metadata – Arbitrary key-value metadata attached to this schema element.
number_role_u – Tag for the horizontal (U) axis. Mask columns that share the same
number_role_u/number_role_vpair as an image column get linked cursor and zoom in the Dashboard, so panning or zooming the image moves the overlay in lockstep.number_role_v – Tag for the vertical (V) axis. See
number_role_u.
- class StringSchema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- string_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
- bulk_data_location: Url | str | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for string data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.string_role – Escape hatch for UI roles without a baked schema. Prefer
UrlSchemafor URLs andDatetimeStringSchemafor datetime strings. Defaults to no role.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.bulk_data_location – URL or path prefix where bulk data files are stored for this column. When set, the
TableWriterexternalizes column data to files under this location.
- class Uint16Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for uint16 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Uint32Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for uint32 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Uint64Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for uint64 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class Uint8Schema(
- *,
- display_name: str = '',
- shape: tuple[int, ...] | int | None = None,
- number_role: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden, numpy_array, torch_tensor] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for uint8 data.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
shape – Dimensions of the data.
Nonefor scalar,intortuplefor arrays. Use-1for variable-size dimensions.number_role – Escape hatch for UI roles without a baked schema. See
Int8Schema.description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class UnixTimestampSchema(
- *,
- precision: Literal[s, ms, us, ns],
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for int64 Unix timestamps.
Stores time since the Unix epoch (1970-01-01 UTC) at the precision selected by
precision. Precision is required — choose it to match your source data:"s"— whole seconds. Output ofint(time.time())."ms"— milliseconds. Convention used by JavaScriptDate.now()and most JSON APIs."us"— microseconds. Resolution of Pythondatetimeand Arrowtimestamp[us]."ns"— nanoseconds. Resolution of pandasTimestampand Arrowtimestamp[ns].
- Parameters:
precision – Time unit of the stored integer. See the class docstring for the conventions each value matches.
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.
- class UrlSchema(
- *,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- sample_type: Literal[hidden] | None = None,
- bulk_data_location: Url | str | None = None,
Bases:
tlc.schemas._primitive_schemas.StringSchemaSchema for URL strings.
The stored value is a plain string, but the URL role enables automatic path aliasing and relativization, and signals to the Dashboard that the value refers to an external file.
- Parameters:
display_name – Column display name in the Dashboard. Also used as column key in tuple shorthand.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
sample_type – Override the sample type.
Nonemeans identity (no transform),"hidden"hides from sample view.bulk_data_location – URL or path prefix where bulk data files are stored for this column. When set, the
TableWriterexternalizes column data to files under this location.
- class VideoUrlSchema(
- *,
- display_name: str = '',
- description: str = '',
- writable: bool = True,
- default_visible: bool = True,
- default_value: Any = None,
- metadata: dict[str, Any] | None = None,
- number_role_u: str | None = None,
- number_role_v: str | None = None,
Bases:
tlc.schemas._schema.SchemaSchema for video URL references.
Stores URL strings pointing to existing video files.
- Parameters:
display_name – Column display name in the Dashboard.
description – Column description.
writable – Whether the column is editable in the Dashboard.
default_visible – Whether the column is visible by default.
default_value – Default value for new rows.
metadata – Arbitrary key-value metadata attached to this schema element.
number_role_u – Tag for the horizontal (U) axis. Image columns that share the same
number_role_u/number_role_vpair get linked cursor and zoom in the Dashboard, so panning or zooming one image moves the others in lockstep.number_role_v – Tag for the vertical (V) axis. See
number_role_u.