예제 #1
0
def get_experiment_model(experiment_id: int) -> object:
    database = Database()
    query = f"SELECT project_id FROM experiment WHERE id = {experiment_id}"
    project_id = database.read(query=query)[0]['project_id']
    registry = Registry()
    return registry.get_model(path=f"{project_id}-{experiment_id}",
                              key='model')
예제 #2
0
def get_experiment_target(experiment_id: int) -> pd.DataFrame:
    database = Database()
    query = f"SELECT project_id FROM experiment WHERE id = {experiment_id}"
    project_id = database.read(query=query)[0]['project_id']
    registry = Registry()
    return registry.get_dataset(path=f"{project_id}-{experiment_id}",
                                key='target')
예제 #3
0
def get_experiment(experiment_id: int) -> dict:
    query = f"SELECT * FROM experiment WHERE id = {experiment_id}"
    database = Database()
    return database.read(query=query)[0]
예제 #4
0
def get_experiments() -> dict:
    query = "SELECT * FROM experiment"
    database = Database()
    return database.read(query=query)
예제 #5
0
def get_projects() -> dict:
    query = "SELECT * FROM project"
    database = Database()
    return database.read(query=query)
예제 #6
0
def get_prediction(prediction_id: int):
    database = Database()
    query = f"SELECT * FROM serving WHERE id = {prediction_id}"
    return database.read(query=query)[0]
예제 #7
0
def get_deployments():
    query = f"SELECT * FROM experiment WHERE status = 'deployed'"
    database = Database()
    return database.read(query=query)