-
Notifications
You must be signed in to change notification settings - Fork 11
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
Model labels
in the openapi models
#151
Comments
IMHO, we need to avoid having fields/properties called If we go down this path, we start turning the REST API into the BFF pattern I mentioned before. I strongly recommend that we should keep the API closer to the backend and avoid having to change it every time some presentation change is needed in the UI. The UI has a proxy of their own, and they can accommodate these BFF patterns in that layer. |
So are you suggesting to keep the models as they are (i.e., without any explicit field |
I'd recommend giving UI folks a pragmatic example, something like: curl -X 'POST' \
'http://localhost:8080/api/model_registry/v1alpha1/registered_models' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"customProperties": {
"labels": {
"struct_value": "{\"labels\": [\"ocr\",\"img2text\",\"mnist\"]}"
}
},
"description": "handwriting recognition of digits",
"name": "mnist"
}' Which should work already, but worth to test it out e2e on our side first. This way, they can develop to "accommodate these BFF patterns in that layer" as in the conversion function to/from the customProperty in the UI proxy layer. |
taking base64 encoding of: which works as:
but likely the current discussed proposal to use "empty valued properties",
is proving more simpler to handle |
I'd go with the simpler empty string implementation. It's easier to implement, and intuitive. It also works for the scenario you mentioned @tarilabs of properties with optional values. They can semantically (and correctly) be interpreted as labels when a value is not specified. |
can there be a key value pair with empty string in custom properties perhaps? another suggestion, what if u introduce another discriminator called "label"? will that work? |
the first I believe is exactly what was discussed in the earlier messages, can you confirm? fwiw, added demo with kubeflow/model-registry#53 |
Thanks @tarilabs sounds good. |
is there any further implementation done for this or can this be closed? |
we need kubeflow/model-registry#53 merged for this to be closed. |
I am good with that, can I lgtm or do you need a review by anyone else? |
as soon as kubeflow/model-registry#53 is merged, I will make sure this one is closed as well for https://issues.redhat.com/browse/RHOAIENG-893 |
done with kubeflow/model-registry#53 |
* update goverter to 1.4.1 As that fixed a nil assignment override[1][2] which prevented us from emulating copy constructors[3]. The update also allows us to use generics. [1]: jmattheis/goverter#146 (comment) [2]: jmattheis/goverter#97 [3]: jmattheis/goverter#147 Signed-off-by: Isabella Basso do Amaral <[email protected]> Signed-off-by: Isabella do Amaral <[email protected]> * simplify converter utils using generics Signed-off-by: Isabella do Amaral <[email protected]> * server: update existing objects on PATCH Signed-off-by: Isabella do Amaral <[email protected]> --------- Signed-off-by: Isabella Basso do Amaral <[email protected]> Signed-off-by: Isabella do Amaral <[email protected]>
Is your feature request related to a problem? Please describe.
As discussed in UI/UX meetings other than key-value pairs (i.e.,
properties
) we also havelabels
.Right now openapi models do not have explicit
labels
field, we should consider adding it.Describe the solution you'd like
In the openapi spec: add a new field named
labels
that will contain all labels associated to an entity.RegisteredModel
ModelVersion
How can we map these labels in the underlying ml-metadata model?
Create a property named
labels
of typestruct value
that can contain the array of stringsDescribe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: