embedl_hub.core package#

Public API for the Embedl Hub core package.

Subpackages#

Top-level re-exports#

class embedl_hub.core.HubContext(project_name: str, artifact_base_dir: Path | None = None, devices: Sequence[Device] | None = None, download_artifacts: bool = False, auto_connect: bool = True, log_remote_artifacts: bool = True)[source]#

Bases: object

Context for component execution.

artifact_base_dir: LocalPath#
property artifact_dir: Path#

Get the local artifact directory for the current component run.

Raises:

RuntimeError – If no artifact directory has been set. This typically means the property is accessed outside of a component dispatch.

auto_connect: bool#
client: Client#
devices: dict[str, Device]#
download_artifacts: bool#
property is_active: bool#

Whether this context has been entered and is currently active.

property project_dir: Path#

Get the project-scoped artifact directory.

Returns artifact_base_dir / project_name. Run subdirectories are created beneath this path.

project_name: str#
set_tags(**tags: str) None[source]#

Set tags that will be applied to all subsequent runs.

Replaces any previously set tags. Each keyword argument becomes a tag with the argument name as the tag name and its value as the tag value.

Example:

ctx.set_tags(model="resnet50", dataset="imagenet")
Parameters:

tags – Arbitrary keyword arguments where each key is a tag name and each value is a tag value (both str).

Raises:

TypeError – If any value is not a string.

property tags: dict[str, str]#

Get the current tags set on this context (read-only copy).

embedl_hub.core.LocalPath#

alias of Path

embedl_hub.core.RemotePath#

alias of PurePosixPath

Subpackages#