Skip to content

Adds boilerplate for ModelVersionsController#show

Eduardo Bonet requested to merge model_registry/scaffold_show_model_version into master

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

image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. 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
  2. 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.

Edited by Eduardo Bonet

Merge request reports

Loading