TensorStore relies on a JSON Spec format for specifying all parameters necessary for opening or creating a TensorStore.

json TensorStore : object

Specifies a TensorStore to open/create.

The following properties are supported by all TensorStore drivers. Refer to the driver documentation for the supported driver identifiers and driver-specific properties.


KeyValueStoreBackedChunkDriver driver/array driver/cast driver/downsample driver/json

Required members

driver : string

Driver identifier

Specifies the TensorStore driver.

Optional members

context : Context

Specifies context resources that augment/override the parent context.

dtype : dtype

Specifies the data type.

rank : integer[0, 32]

Specifies the rank of the TensorStore.

If transform is also specified, the input rank must match. Otherwise, the rank constraint applies to the driver directly.

transform : IndexTransform

Specifies a transform.

json dtype : "bool" | "char" | "byte" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32" | "int64" | "uint64" | "float16" | "bfloat16" | "float32" | "float64" | "complex64" | "complex128" | "string" | "ustring" | "json"

Specifies a TensorStore data type.

TensorStore data types correspond to the logical data representation, not the precise encoding. There are not separate data types for little endian and big endian byte order.

One of


Boolean value (0 or 1).

Each value occupies an entire byte in memory, but depending on the format may be encoded more efficiently.


Single byte, interpreted as an ASCII character.


Single byte.


8-bit signed two’s-complement integer.


8-bit unsigned integer.


16-bit signed two’s-complement integer.


16-bit unsigned integer.


32-bit signed two’s-complement integer.


32-bit unsigned integer.


64-bit signed two’s-complement integer.


64-bit unsigned integer.


IEEE 754 binary16 half-precision floating-point number.


bfloat16 floating-point format number.


IEEE 754 binary32 single-precision floating-point number.


IEEE 754 binary64 double-precision floating-point number.


Complex number, where the real and imaginary components are each represented by a float32.


Complex number, where the real and imaginary components are each represented by a float64.


Byte string.


Unicode string (represented in memory as UTF-8).


JSON value.