Skip to content

metadata_value

mlte/store/artifact/underlying/rdbs/metadata_value.py

Definition of the metadata (DB schema) for Values in the artifact store.

init_value_types(session)

Initializes the table with the configured value types.

Source code in mlte/store/artifact/underlying/rdbs/metadata_value.py
71
72
73
74
75
76
77
78
def init_value_types(session: Session):
    """Initializes the table with the configured value types."""
    if session.scalars(select(DBValueType)).first() is None:
        types = [e.value for e in ValueType]
        for type in types:
            type_obj = DBValueType(name=type)
            session.add(type_obj)
        session.commit()