Skip to content

Store

store

store_cv = ContextVar('store', default=None) module-attribute

VariableType = Literal['param', 'metric'] module-attribute

ValueType = Union[str, float, int, bool, None] module-attribute

StoredModel

Bases: BaseModel

store: TrackingStore property

__post_init__()

ValueMapping

Bases: TypedDict

key: str instance-attribute

value: ValueType instance-attribute

type: VariableType instance-attribute

step_id: Optional[int] instance-attribute

timestamp: Optional[dt.datetime] instance-attribute

is_step: Optional[bool] instance-attribute

ValueTuple

Bases: NamedTuple

key: str instance-attribute

value: ValueType instance-attribute

type: VariableType instance-attribute

step_id: Optional[int] = None class-attribute instance-attribute

timestamp: Optional[dt.datetime] = None class-attribute instance-attribute

is_step: Optional[bool] = None class-attribute instance-attribute

TrackingStoreMetaClass

Bases: ABCMeta

__new__(name, bases, attrs: Dict[str, Any], **kwargs)

TrackingStore

Abstract class for tracking store.

This class is used to define the interface for tracking store.

__enter__()

__exit__(exc_type, exc_value, traceback)

create_experiment(name: str, description: Optional[str] = None, artifact_uri: Optional[str] = None) -> Experiment abstractmethod

list_experiments() -> List[Experiment] abstractmethod

get_experiment(experiment_id: int) -> Experiment abstractmethod

get_experiment_by_name(name: str) -> Experiment abstractmethod

create_run(experiment_id: int, name: str, description: Optional[str] = None) -> Run abstractmethod

delete_run(experiment_id: int, run_id: int) -> None abstractmethod

list_runs(experiment_id: int) -> List[Run] abstractmethod

search_runs(experiment_id: int, **kwargs) -> List[Run] abstractmethod

set_tag(run_id: int, name: str, value: JSONType = None) -> RunTags abstractmethod

get_tag(run_id: int, name: str) -> JSONType abstractmethod

get_tags(run_id: int) -> Dict[str, JSONType] abstractmethod

count_tags(run_id: int) -> int abstractmethod

delete_tag(run_id: int, name: str) -> RunTags abstractmethod

log_value(run_id: int, key: str, value: str, *, step_id: Optional[int] = None, type: Optional[VariableType] = None, is_step: Optional[bool] = None) -> Value abstractmethod

log_values(run_id: int, values: List[Union[ValueMapping, ValueTuple, Value]], *, step_id: Optional[int] = None, type: Optional[VariableType] = None) -> List[Value]

get_values(run_id: int) -> List[Tuple[Variable, Value]] abstractmethod

import_store(other: TrackingStore)

wrap(method)