Skip to content

Config

timenet.config source

Runtime configuration, resolved with pydantic-settings.

All local state lives under a single home directory (default ~/.cache/timenet), mirroring HuggingFace's HF_HOME -> HF_DATASETS_CACHE / HF_HUB_CACHE hierarchy. Setting TIMENET_HOME relocates everything; the per-area env vars override just their own path. Precedence for any value is explicit argument (e.g. a CLI flag) > environment variable > default. This model is the single place to add future configuration.

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 curation raw sources and Hub downloads are cached (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).

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 loaded/downloaded datasets are cached (analog of HF_DATASETS_CACHE).

settings source

settings(**overrides: Any) -> TimeNetSettings

Build settings, letting explicit non-None overrides win over env and defaults.

None overrides are dropped so a missing CLI flag falls through to the environment, then the default.

Parameters:

Name Type Description Default
**overrides Any

Field overrides (e.g. storage=..., registry=...).

{}

Returns:

Type Description
TimeNetSettings

The resolved :class:TimeNetSettings.