Skip to content

Sqlalchemy store

sqlalchemy_store

mapper_registry = registry() module-attribute

variable_constraints = (Index('ix_experiment_id_key', Variable.experiment_id, Variable.key, case((Variable.parent_id.is_(None), '<NULL>'), else_=Variable.parent_id), unique=True),) module-attribute

SQLAlchemyModelMixin

init_on_load()

SQLAlchemyTrackingStore

Bases: TrackingStore

SQLAlchemy tracking store.

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

lock: Optional[FileLock] = lockfile instance-attribute

engine = create_engine(url) instance-attribute

__init__(url: Union[str, URL] = 'sqlite:///:memory:')

create_all(checkfirst: bool = True)

session()

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

list_experiments() -> List[Experiment]

get_experiment(experiment_id: int) -> Experiment

get_experiment_by_name(name: str) -> Experiment

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

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

search_runs(experiment_id: int, expression: Optional[ColumnExpressionArgument[bool]] = None) -> List[Run]

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

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

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

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

count_tags(run_id: int) -> int

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

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

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

SQLAlchemyStore