Adds boilerplate for ModelVersionsController#show
What does this MR do and why?
Adds boilerplate for ModelVersionsController#show, similar to !133991 (merged)
Adds backend and frontend boilerplate code for GET /-/ml/models/{model_id}/versions/{version_id}
Changelog: added
Screenshots or screen recordings
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Create a model version
Feature.enable("model_registry") p = Project.find_by(id: 20) # or whatever project you want to use for testing version = Ml::FindOrCreateModelVersionService.new(p, { model_name: "model_1", version: "1.0.0" }).execute version.present.path
-
Navigate to the output path, verify the name and version display correctly
Database
SELECT
"ml_model_versions".*
FROM
"ml_model_versions"
WHERE
"ml_model_versions"."project_id" = 19
AND "ml_model_versions"."id" = 5075
Local explain (~5k model versions):
Index Scan using ml_model_versions_pkey on ml_model_versions (cost=0.28..2.30 rows=1 width=56) (actual time=0.041..0.042 rows=1 loops=1)
Index Cond: (id = 5075)
Filter: (project_id = 19)
Planning Time: 2.337 ms
Execution Time: 0.091 ms
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Bonet