JSON Spec

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.

Subtypes

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

"bool"

Boolean value (0 or 1).

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

"char"

Single byte, interpreted as an ASCII character.

"byte"

Single byte.

"int8"

8-bit signed two’s-complement integer.

"uint8"

8-bit unsigned integer.

"int16"

16-bit signed two’s-complement integer.

"uint16"

16-bit unsigned integer.

"int32"

32-bit signed two’s-complement integer.

"uint32"

32-bit unsigned integer.

"int64"

64-bit signed two’s-complement integer.

"uint64"

64-bit unsigned integer.

"float16"

IEEE 754 binary16 half-precision floating-point number.

"bfloat16"

bfloat16 floating-point format number.

"float32"

IEEE 754 binary32 single-precision floating-point number.

"float64"

IEEE 754 binary64 double-precision floating-point number.

"complex64"

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

"complex128"

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

"string"

Byte string.

"ustring"

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

"json"

JSON value.