Client
timenet.client ¶source
The :class:TimeNet SDK: the single entry point for using TimeNet from code.
Wraps a :class:~timenet.registry.BaseRegistry (the catalog) and a local storage path (the download
cache), exposing list / get / search / download / load. It never runs connector
code; producing datasets is the curation side.
TimeNet ¶source
Browse a registry and fetch datasets to local storage.
download ¶source
Fetch a dataset version's files into local storage and return its directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The dataset id. |
required |
version
|
str | None
|
The version string, or |
None
|
force
|
bool
|
Re-download even if an up-to-date copy already exists. |
False
|
Returns:
| Type | Description |
|---|---|
Path
|
The local |
list ¶source
Return the metadata of every dataset in the registry.
Returns:
| Name | Type | Description |
|---|---|---|
One |
_Metadatas
|
class: |
load ¶source
load(
dataset_id: str, version: str | None = None
) -> TimeFDataset
Download if needed, then read the dataset into memory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The dataset id. |
required |
version
|
str | None
|
The version string, or |
None
|
Returns:
| Type | Description |
|---|---|
TimeFDataset
|
The dataset with lazy per-series loaders backed by the local copy. |
load_torch ¶source
Download if needed and return the dataset as a read-only PyTorch Dataset.
Requires the torch extra (install coming soon); the torch view is imported
lazily so base users don't need torch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The dataset id. |
required |
version
|
str | None
|
The version string, or |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
TimeFTorchDataset
|
class: |
search ¶source
search(
*,
query: _OrList[str] = None,
domain: _OrList[Domain] = None,
task: _OrList[type[Task]] = None,
license: _OrList[License] = None,
time_series_spec: _OrList[str] = None,
dataset_id: _OrList[str] = None,
tag: _OrList[str] = None,
limit: int = 100,
) -> _Metadatas
Search the registry. Mirrors :meth:~timenet.registry.BaseRegistry.search.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
_OrList[str]
|
Free-text terms over name/description/tags. |
None
|
domain
|
_OrList[Domain]
|
Keep datasets sharing any of these domains. |
None
|
task
|
_OrList[type[Task]]
|
Keep datasets whose schema includes any of these task classes. |
None
|
license
|
_OrList[License]
|
Keep datasets with any of these licenses. |
None
|
time_series_spec
|
_OrList[str]
|
Keep datasets declaring all of these |
None
|
dataset_id
|
_OrList[str]
|
Keep only these ids. |
None
|
tag
|
_OrList[str]
|
Keep datasets declaring all of these tags. |
None
|
limit
|
int
|
Maximum number of results. |
100
|
Returns:
| Type | Description |
|---|---|
_Metadatas
|
The matching dataset metadata. |