mlflow/database/__init__.py
def create(model_uri, db_uri, user_id, table_name="models"):
    """
    Register an MLflow model with a SQL database.
    :param model_uri: The location, in URI format, of the MLflow model used to build the Azure
                      ML deployment image. For example:
                      - ``models:/<model_name>/<model_version>``
    :param db_uri: The URI of the SQL DB to deploy in the form:
                    <dialect>+<driver>://<username>:<password>@<host>:<port>/<database>
    :param user_id: The principal ID that is deploying the model
    :param table_name: The name of the SQL table to deploy the model to.
    If not specified, will use 'models' table.
    """
    engine = sqlalchemy.create_engine(db_uri)

    table = make_deployed_model(table_name)
    table.__table__.create(bind=engine, checkfirst=True)
    InitialBase.metadata.bind = engine
    SessionMaker = sqlalchemy.orm.sessionmaker(bind=engine)
    ManagedSessionMaker = _get_managed_session_maker(SessionMaker)

    with ManagedSessionMaker() as session:
        deployed_model = collect_model_metadata(model_uri, user_id, table)
        session.add(deployed_model)
        session.flush()

    Register an MLflow model with a SQL database.
    :param model_uri: The location, in URI format, of the MLflow model used to build the Azure
                      ML deployment image. For example:
                      - ``models:/<model_name>/<model_version>``
    :param db_uri: The URI of the SQL DB to deploy in the form:
                    <dialect>+<driver>://<username>:<password>@<host>:<port>/<database>
    :param user_id: The principal ID that is deploying the model
    :param table_name: The name of the SQL table to deploy the model to.
    If not specified, will use 'models' table.
    
Register an MLflow model with a SQL database.
Register an MLflow model with a SQL database .
def create(model_uri, db_uri, user_id, table_name="models"):
    engine = sqlalchemy.create_engine(db_uri)
    table = make_deployed_model(table_name)
    table.__table__.create(bind=engine, checkfirst=True)
    InitialBase.metadata.bind = engine
    SessionMaker = sqlalchemy.orm.sessionmaker(bind=engine)
    ManagedSessionMaker = _get_managed_session_maker(SessionMaker)
    with ManagedSessionMaker() as session:
        deployed_model = collect_model_metadata(model_uri, user_id, table)
        session.add(deployed_model)
        session.flush()
def create ( model_uri , db_uri , user_id , table_name = "models" ) : engine = sqlalchemy . create_engine ( db_uri ) table = make_deployed_model ( table_name ) table . __table__ . create ( bind = engine , checkfirst = True ) InitialBase . metadata . bind = engine SessionMaker = sqlalchemy . orm . sessionmaker ( bind = engine ) ManagedSessionMaker = _get_managed_session_maker ( SessionMaker ) with ManagedSessionMaker ( ) as session : deployed_model = collect_model_metadata ( model_uri , user_id , table ) session . add ( deployed_model ) session . flush ( )
Register an MLflow model with a SQL database.
Register an MLflow model with a SQL database .
"""
    Register an MLflow model with a SQL database.
    :param model_uri: The location, in URI format, of the MLflow model used to build the Azure
                      ML deployment image. For example:
                      - ``models:/<model_name>/<model_version>``
    :param db_uri: The URI of the SQL DB to deploy in the form:
                    <dialect>+<driver>://<username>:<password>@<host>:<port>/<database>
    :param user_id: The principal ID that is deploying the model
    :param table_name: The name of the SQL table to deploy the model to.
    If not specified, will use 'models' table.
    """
model_uri
The location, in URI format, of the MLflow model used to build the Azure
ML deployment image. For example:
``models://``
The location in URI format of the MLflow model used to build the Azure ML deployment image . For example : ` ` models : // ` `
db_uri
The URI of the SQL DB to deploy in the form:
+://:@:/
The URI of the SQL DB to deploy in the form : + : // : @ : /
user_id
The principal ID that is deploying the model
The principal ID that is deploying the model
table_name
The name of the SQL table to deploy the model to.
If not specified, will use 'models' table.
The name of the SQL table to deploy the model to . If not specified will use ' models ' table .