Model Registry: Get latest Semantic Version
What does this MR do and why?
This MR changes the behavior of the endpoint ml/get_latest_versions
it now returns the highest / latest Semantic Version instead of the highest ID. Allowing users to provide beta releases, patch versions for older models, etc while still pointing to the latest / highest released version.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Open GDK: http://127.0.0.1:3000/flightjs/Flight/-/ml/models
- Create model if one doesn't exist, give it a model name and version (
1.0.0
, clickCreate
- Create another model version for the same model with a lower server e.g.
0.0.1
- Perform the following cURL
curl -X GET --header "Authorization: Bearer glpat-<redacted>" "http://127.0.0.1:3000/api/v4/projects/7/ml/mlflow/api/2.0/mlflow/registered-models/get-latest-versions?name=<model-name>"
- This should return version
1.0.0
, note the version name is presented in the keyaliases
.
{"model_versions":[{"name":"my-model2","version":"17","creation_timestamp":1726563129,"last_updated_timestamp":1726814967,"user_id":null,"current_stage":"development","description":"abc","source":"http://127.0.0.1:3000/flightjs/Flight/-/ml/models/4/versions/17","run_id":"beb67dce-a0ca-4e6d-b171-c34351505aa9","status":"READY","status_message":"","tags":[],"run_link":"","aliases":["1.0.0"]}]}
Numbered steps to set up and validate the change are strongly suggested.
Related to #428644 (closed)
Edited by Fred de Gier
Merge request reports
Activity
Please register or sign in to reply