Skip to content

Commit 6cb5f35

Browse files
Enable mlfow model deployments with a click (#584)
* enable mlfow deployments * update actions * use ubuntu 22 * remove old python version * ch: try version 3.9 * remove typo * remove 3.11 version
1 parent 8e8a0ee commit 6cb5f35

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
jobs:
1313
build:
1414

15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-24.04
1616

1717
services:
1818
postgres:
@@ -38,7 +38,7 @@ jobs:
3838

3939
strategy:
4040
matrix:
41-
python-version: ["3.6", "3.7", "3.10"]
41+
python-version: [ "3.9", "3.10"]
4242

4343
steps:
4444
- uses: actions/checkout@v2

api_docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,6 +2870,12 @@ paths:
28702870
model_image_uri:
28712871
type: string
28722872
example: ""
2873+
mlflow_artifact_uri:
2874+
type: string
2875+
example: "run:/658456547698779878/model"
2876+
is_mlflow:
2877+
type: boolean
2878+
example: false
28732879
api_type:
28742880
type: string
28752881
example: "REST"

app/schemas/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ class MLAppDeploySchema(Schema):
8585
is_notebook = fields.Boolean(required=True)
8686
is_modal = fields.Bool(required=False)
8787
model_image_uri = fields.Str(required=False)
88+
mlflow_artifact_uri = fields.Str(required=False)
89+
is_mlflow = fields.Boolean(required=False)
8890
api_type = fields.Str(required=False, default="REST", validate=validate.OneOf(
8991
["REST", "GRPC"]
9092
))
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"""empty message
2+
3+
Revision ID: d4fe6198fe3d
4+
Revises: c7eb8227cead
5+
Create Date: 2025-04-08 11:21:22.937379
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
from sqlalchemy.dialects import postgresql
11+
12+
# revision identifiers, used by Alembic.
13+
revision = 'd4fe6198fe3d'
14+
down_revision = 'c7eb8227cead'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
# ### commands auto generated by Alembic - please adjust! ###
21+
op.drop_table('project_database')
22+
op.add_column('user', sa.Column('last_reminder_sent', sa.DateTime(), nullable=True))
23+
# ### end Alembic commands ###
24+
25+
26+
def downgrade():
27+
# ### commands auto generated by Alembic - please adjust! ###
28+
op.drop_column('user', 'last_reminder_sent')
29+
op.create_table('project_database',
30+
sa.Column('id', postgresql.UUID(), server_default=sa.text('uuid_generate_v4()'), autoincrement=False, nullable=False),
31+
sa.Column('project_id', postgresql.UUID(), autoincrement=False, nullable=True),
32+
sa.Column('date_created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
33+
sa.Column('host', sa.VARCHAR(length=256), autoincrement=False, nullable=True),
34+
sa.Column('name', sa.VARCHAR(length=256), autoincrement=False, nullable=False),
35+
sa.Column('password', sa.VARCHAR(length=256), autoincrement=False, nullable=False),
36+
sa.Column('user', sa.VARCHAR(length=256), autoincrement=False, nullable=False),
37+
sa.Column('port', sa.INTEGER(), autoincrement=False, nullable=True),
38+
sa.Column('database_flavour_name', sa.VARCHAR(length=256), autoincrement=False, nullable=True),
39+
sa.Column('deleted', sa.BOOLEAN(), autoincrement=False, nullable=True),
40+
sa.Column('disabled', sa.BOOLEAN(), autoincrement=False, nullable=True),
41+
sa.Column('admin_disabled', sa.BOOLEAN(), autoincrement=False, nullable=True),
42+
sa.ForeignKeyConstraint(['project_id'], ['project.id'], name='project_database_project_id_fkey'),
43+
sa.PrimaryKeyConstraint('id', name='project_database_pkey')
44+
)
45+
# ### end Alembic commands ###

0 commit comments

Comments
 (0)