Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp docs & codebase #542

Merged
merged 6 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Model registry provides a central repository for model developers to store and m
- [playground](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/kubeflow/model-registry/main/api/openapi/model-registry.yaml)
- [license scanning](https://github.com/kubeflow/model-registry/issues/323)
- [monitoring image quality](https://github.com/kubeflow/model-registry/issues/327)
8. [UI](.clients/ui/README.md)

## Pre-requisites:
- go >= 1.21
Expand Down
32 changes: 32 additions & 0 deletions clients/ui/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
CONTAINER_TOOL ?= docker

.PHONY: all
all: build

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

.PHONY: dev-install-dependencies
dev-install-dependencies:
cd frontend && npm install

.PHONY: dev-bff
dev-bff:
cd bff && make run PORT=4000 MOCK_K8S_CLIENT=true MOCK_MR_CLIENT=true

.PHONY: dev-frontend
dev-frontend:
cd frontend && npm run start:dev

.PHONY: dev-start
dev-start:
make -j 2 dev-bff dev-frontend

.PHONY: docker-compose
docker-compose:
$(CONTAINER_TOOL) compose -f docker-compose.yaml up

.PHONY: kind-deployment
kind-deployment:
./scripts/deploy_kind_cluster.sh
48 changes: 48 additions & 0 deletions clients/ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[frontend requirements]: ./frontend/docs/dev-setup.md#requirements
[BFF requirements]: ./bff/README.md#pre-requisites
[frontend dev setup]: ./frontend/docs/dev-setup.md#development
[BFF dev setup]: ./bff/README.md#development

# Model Registry UI

## Overview

The Model Registry UI is a standalone web app for Kubeflow Model Registry. In this repository, you will find the frontend and backend for the Model Registry UI.

## Prerequisites

* [Frontend requirements]
* [BFF requirements]

## Set Up

### Development

To run the a mocked dev environment you can either:

* Use the makefile command to install dependencies `make dev-install-dependencies` and then start the dev environment `make dev-start`.

* Or follow the [frontend dev setup] and [BFF dev setup].

### Docker deployment

To build the Model Registry UI container, run the following command:

```shell
make docker-compose
```

### Kubernetes Deployment

For a in-depth guide on how to deploy the Model Registry UI, please refer to the [local kubernetes deployment](./bff/docs/dev-guide.md) documentation.

To quickly enable the Model Registry UI in your Kind cluster, you can use the following command:

```shell
make kind-deployment
```

## OpenAPI Specification

You can find the OpenAPI specification for the Model Registry UI in the [openapi](./api/openapi) directory.
A live version of the OpenAPI specification can be found [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubeflow/model-registry/main/clients/ui/api/openapi/mod-arch.yaml).
172 changes: 149 additions & 23 deletions clients/ui/api/openapi/mod-arch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersionUpdate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersionUpdate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -141,7 +147,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelCreate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelCreate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -186,7 +198,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelUpdate"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelUpdate"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -244,7 +262,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/Artifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Artifact"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -305,7 +329,13 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersion"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersion"
required: true
tags:
- ModelRegistryService
Expand Down Expand Up @@ -972,99 +1002,195 @@ components:
content:
application/json:
schema:
$ref: "#/components/schemas/Config"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Config"
description: A response containing a list of ModelArtifact entities.
ModelRegistryRespone:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ModelRegistry"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
type: array
items:
$ref: "#/components/schemas/ModelRegistry"
description: A response containing a list of ModelArtifact entities.
ModelArtifactListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelArtifactList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelArtifactList"
description: A response containing a list of ModelArtifact entities.
ModelArtifactResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelArtifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelArtifact"
description: A response containing a `ModelArtifact` entity.
ModelVersionListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersionList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersionList"
description: A response containing a list of `ModelVersion` entities.
ModelVersionResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ModelVersion"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ModelVersion"
description: A response containing a `ModelVersion` entity.
RegisteredModelListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModelList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModelList"
description: A response containing a list of `RegisteredModel` entities.
RegisteredModelResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/RegisteredModel"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/RegisteredModel"
description: A response containing a `RegisteredModel` entity.
ArtifactResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/Artifact"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/Artifact"
description: A response containing an `Artifact` entity.
ArtifactListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ArtifactList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ArtifactList"
description: A response containing a list of `Artifact` entities.
ServingEnvironmentListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServingEnvironmentList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServingEnvironmentList"
description: A response containing a list of `ServingEnvironment` entities.
ServingEnvironmentResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServingEnvironment"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServingEnvironment"
description: A response containing a `ServingEnvironment` entity.
InferenceServiceListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/InferenceServiceList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/InferenceServiceList"
description: A response containing a list of `InferenceService` entities.
InferenceServiceResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/InferenceService"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/InferenceService"
description: A response containing a `InferenceService` entity.
ServeModelListResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServeModelList"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServeModelList"
description: A response containing a list of `ServeModel` entities.
ServeModelResponse:
content:
application/json:
schema:
$ref: "#/components/schemas/ServeModel"
type: object
properties:
metadata:
type: object
description: Metadata about the response
data:
$ref: "#/components/schemas/ServeModel"
description: A response containing a `ServeModel` entity.
parameters:
modelRegistryName:
Expand Down
3 changes: 2 additions & 1 deletion clients/ui/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ports:
- 8080:8080
environment:
API_URL: http://model-registry-bff:4001
API_URL: http://model-registry-bff:4000
networks:
- model_registry
depends_on:
Expand All @@ -15,6 +15,7 @@ services:
container_name: model-registry-bff
command:
- "--mock-k8s-client=true"
- "--mock-mr-client=true"
networks:
- model_registry

Expand Down
Loading