Skip to content

Commit 72bfda2

Browse files
committed
Add workspace database schema
This adds the required workspace columns and the workspace catalog table with the default workspace precreated. All workspace columns default to "default" for now and we may choose to remove the defaults once the tracking store and model registry store are made workspace aware to catch application logic issues not properly setting the workspace.
1 parent 9983c5c commit 72bfda2

19 files changed

Lines changed: 2403 additions & 88 deletions

File tree

docs/api_reference/api_inventory.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ mlflow.entities.WebhookStatus.to_proto
528528
mlflow.entities.WebhookTestResult
529529
mlflow.entities.WebhookTestResult.from_proto
530530
mlflow.entities.WebhookTestResult.to_proto
531+
mlflow.entities.Workspace
531532
mlflow.entities.assessment.Assessment
532533
mlflow.entities.assessment.Expectation
533534
mlflow.entities.assessment.Feedback
@@ -627,6 +628,7 @@ mlflow.entities.webhook.Webhook
627628
mlflow.entities.webhook.WebhookEvent
628629
mlflow.entities.webhook.WebhookStatus
629630
mlflow.entities.webhook.WebhookTestResult
631+
mlflow.entities.workspace.Workspace
630632
mlflow.evaluate
631633
mlflow.exceptions.get_error_code
632634
mlflow.finalize_logged_model

mlflow/entities/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
WebhookStatus,
6363
WebhookTestResult,
6464
)
65+
from mlflow.entities.workspace import Workspace
6566

6667
__all__ = [
6768
"Experiment",
@@ -125,6 +126,7 @@
125126
"WebhookEvent",
126127
"WebhookStatus",
127128
"WebhookTestResult",
129+
"Workspace",
128130
]
129131

130132

mlflow/entities/workspace.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""Workspace entity shared between server and stores."""
2+
3+
from __future__ import annotations
4+
5+
from dataclasses import dataclass
6+
7+
8+
@dataclass(frozen=True, slots=True)
9+
class Workspace:
10+
"""Minimal metadata describing a workspace."""
11+
12+
name: str
13+
description: str | None = None

0 commit comments

Comments
 (0)