Api
timenet_connectors.api ¶source
Producer-side shortcuts for curating and consuming a dataset from local code.
:func:build runs a connector through the engine into the shared local registry; :func:load does
that and reads the result back. Heavy dependencies (the writer/reader stacks) are imported lazily so
importing :mod:timenet_connectors stays cheap.
build ¶source
Curate a dataset into a local registry, resolving its connector by id.
The producer-side one-liner over the engine. An already-curated version is reused unless force
is set. The default output is the shared local registry
(:func:timenet.registry.default_registry_path), the very directory the SDK reads from, so a build
here is immediately loadable with TimeNet().load(dataset_id).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The dataset id ( |
required |
out
|
str | Path | None
|
Output registry directory; defaults to the shared local registry. |
None
|
force
|
bool
|
Rebuild even if the version is already curated. |
False
|
Returns:
| Type | Description |
|---|---|
Path
|
The committed version directory. |
load ¶source
load(
dataset_id: str, version: str | None = None
) -> TimeFDataset
Curate a dataset if needed, then load it into memory.
The demo/one-call sugar over :func:build plus :meth:timenet.client.TimeNet.load. For a clear
producer/consumer split, call :func:build and TimeNet().load yourself.
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 loaded dataset. |