Skip to content

Config

timenet.config source

Runtime configuration, resolved with pydantic-settings.

All local state lives under one home directory (default ~/.cache/timenet). This mirrors HuggingFace's HF_HOME -> HF_DATASETS_CACHE / HF_HUB_CACHE hierarchy. Set TIMENET_HOME to relocate everything. Each per-area env var overrides only its own path. For any value the precedence is explicit argument (for example a CLI flag), then environment variable, then default. Add future configuration to this model.

TimeNetSettings source

Bases: BaseSettings

TimeNet's settings. Reads TIMENET_* environment variables (and an optional .env).

cache class-attribute instance-attribute source

cache: Path | None = None

cache_dir property source

cache_dir: Path

Where the client caches raw build sources and Hub downloads (analog of HF_HUB_CACHE).

home class-attribute instance-attribute source

home: Path = Path('~/.cache/timenet')

home_dir property source

home_dir: Path

The resolved home directory (analog of HF_HOME).

isolation class-attribute instance-attribute source

isolation: Literal['on', 'off'] = 'on'

Whether a build runs in an environment built from the connector's requirements.

"off" runs it in the current interpreter. The isolated child sets this to "off" in its own environment, which is what stops it re-execing forever.

model_config class-attribute instance-attribute source

model_config = SettingsConfigDict(
    env_prefix="TIMENET_", env_file=".env", extra="ignore"
)

registry class-attribute instance-attribute source

registry: str | None = None

registry_path property source

registry_path: Path

The default local registry directory ($TIMENET_REGISTRY is the selector, not this).

storage class-attribute instance-attribute source

storage: Path | None = None

storage_dir property source

storage_dir: Path

Where the client caches loaded or downloaded datasets (analog of HF_DATASETS_CACHE).

token class-attribute instance-attribute source

token: str | None = None

Bearer token for a remote registry (TIMENET_TOKEN); None is anonymous.

settings source

settings(**overrides: Any) -> TimeNetSettings

Build settings so explicit non-None overrides win over env vars and defaults.

This function drops a None override. A missing CLI flag then falls through to the environment, then the default.

Parameters:

Name Type Description Default
**overrides Any

Field overrides (for example storage=..., registry=...).

{}

Returns:

Type Description
TimeNetSettings

The resolved :class:TimeNetSettings.