tensorstore.Context(json: Any, parent: Context | None = None)

Constructs a context from its JSON representation.

Example

>>> context = ts.Context({'cache_pool': {'total_bytes_limit': 5000000}})
>>> context.spec
Context.Spec({'cache_pool': {'total_bytes_limit': 5000000}})
Parameters:
json: Any

JSON representation of the context.

parent: Context | None = None

Parent context from which to inherit. Defaults to a new default context as returned by tensorstore.Context().