Skip to content

Commit

Permalink
sync upstream KF into midstream ODH (#15)
Browse files Browse the repository at this point in the history
* kubeflow: fix go module and odh. debranding (#15)

* kubeflow: change go module name and references

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

* kubeflow: rename odh. into kfmr.

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* kubeflow: py: pyproject description

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* kubeflow: nit picks in text documents

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

---------

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Co-authored-by: tarilabs <matteo.mortari@gmail.com>

* Fix metadata OpenAPI spec (#17)

* fix: OpenAPI metadata discriminator

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* wiring factories and default values missed in codegen

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* introduce openapi defaults

Signed-off-by: tarilabs <matteo.mortari@gmail.com>

* fix TestMetadataValue*

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

* fix: type assert generation

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

* upgrade openapi spec version to v1alpha2

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>

---------

Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
Co-authored-by: tarilabs <matteo.mortari@gmail.com>

* kubeflow: make MLMD type names (and prefix) pluggable (#19)

Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>

* build(deps): bump google.golang.org/grpc from 1.61.1 to 1.62.0 (#20)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.61.1 to 1.62.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.61.1...v1.62.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* OAS: Fix discriminator field definition for Artifact (#22)

* gitignore: ignore all coverage files

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

* OAS: fix discriminator field for Artifact

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>

---------

Signed-off-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
Signed-off-by: Matteo Mortari <matteo.mortari@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Isabella Basso do Amaral <idoamara@redhat.com>
Co-authored-by: Andrea Lamparelli <a.lamparelli95@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Isabella Basso <idoamara@redhat.com>
  • Loading branch information
4 people authored Mar 4, 2024
1 parent 022a263 commit 6ae59f5
Show file tree
Hide file tree
Showing 106 changed files with 1,179 additions and 1,074 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metadata.sqlite.db

# Ignore go vendor and code coverage files
vendor
coverage.txt
coverage.*

# Robot Framework files
log.html
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ api/grpc/ml_metadata/proto/metadata_source.proto:
mkdir -p api/grpc/ml_metadata/proto/
cd api/grpc/ml_metadata/proto/ && \
curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_source.proto" && \
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_source.proto
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";#' metadata_source.proto

api/grpc/ml_metadata/proto/metadata_store.proto:
mkdir -p api/grpc/ml_metadata/proto/
cd api/grpc/ml_metadata/proto/ && \
curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_store.proto" && \
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_store.proto
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";#' metadata_store.proto

api/grpc/ml_metadata/proto/metadata_store_service.proto:
mkdir -p api/grpc/ml_metadata/proto/
cd api/grpc/ml_metadata/proto/ && \
curl -LO "https://raw.githubusercontent.com/google/ml-metadata/v${MLMD_VERSION}/ml_metadata/proto/metadata_store_service.proto" && \
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";#' metadata_store_service.proto
sed -i 's#syntax = "proto[23]";#&\noption go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";#' metadata_store_service.proto

internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto
protoc -I./api/grpc --go_out=./internal --go_opt=paths=source_relative \
Expand All @@ -59,7 +59,7 @@ internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto
gen/grpc: internal/ml_metadata/proto/metadata_store.pb.go internal/ml_metadata/proto/metadata_store_service.pb.go

internal/converter/generated/converter.go: internal/converter/*.go
${GOVERTER} gen github.com/opendatahub-io/model-registry/internal/converter/
${GOVERTER} gen github.com/kubeflow/model-registry/internal/converter/

.PHONY: gen/converter
gen/converter: gen/grpc internal/converter/generated/converter.go
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Model registry provides a central repository for model developers to store and m
- Red Hat drives the project's development through Open Source principles, ensuring transparency, sustainability, and community ownership.
- Red Hat values the Kubeflow community and commits to providing a minimum of 12 months' notice before ending project maintenance after the initial release.

![build checks status](https://github.com/opendatahub-io/model-registry/actions/workflows/build.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/github/opendatahub-io/model-registry/graph/badge.svg?token=61URLQA3VS)](https://codecov.io/github/opendatahub-io/model-registry)
![build checks status](https://github.com/kubeflow/model-registry/actions/workflows/build.yml/badge.svg?branch=main)
[![codecov](https://codecov.io/github/kubeflow/model-registry/graph/badge.svg?token=61URLQA3VS)](https://codecov.io/github/kubeflow/model-registry)

## Pre-requisites:
- go >= 1.19
Expand All @@ -19,14 +19,14 @@ Model registry provides a central repository for model developers to store and m

The model registry proxy server implementation follows a contract-first approach, where the contract is identified by [model-registry.yaml](api/openapi/model-registry.yaml) OpenAPI specification.

You can also easily display the latest OpenAPI contract for model-registry in a Swagger-like editor directly from this repository; for example, [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/opendatahub-io/model-registry/main/api/openapi/model-registry.yaml).
You can also easily display the latest OpenAPI contract for model-registry in a Swagger-like editor directly from this repository; for example, [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/kubeflow/model-registry/main/api/openapi/model-registry.yaml).
### Starting the OpenAPI Proxy Server
Run the following command to start the OpenAPI proxy server from source:

```shell
make run/proxy
```
The proxy service implements the OpenAPI defined in [model-registry.yaml](api/openapi/model-registry.yaml) to create an Open Data Hub specific REST API on top of the existing ml-metadata server.
The proxy service implements the OpenAPI defined in [model-registry.yaml](api/openapi/model-registry.yaml) to create a Model Registry specific REST API on top of the existing ml-metadata server.

> **NOTE** The ml-metadata server must be running and accessible from the environment where model-registry starts up.
Expand Down
2 changes: 1 addition & 1 deletion api/grpc/ml_metadata/proto/metadata_store.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
syntax = "proto2";
option go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";
option go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";

package ml_metadata;

Expand Down
2 changes: 1 addition & 1 deletion api/grpc/ml_metadata/proto/metadata_store_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/

syntax = "proto2";
option go_package = "github.com/opendatahub-io/model-registry/internal/ml_metadata/proto";
option go_package = "github.com/kubeflow/model-registry/internal/ml_metadata/proto";

package ml_metadata;

Expand Down
Loading

0 comments on commit 6ae59f5

Please sign in to comment.