Skip to content

Migrates show_ml_model to graphql

What does this MR do and why?

Migrates show_ml_model to use graphql

Migrates the frontend ShowMlModel to fetch model data from graphql instead of fetching from props. The only UI changes are for error on fetching and loading states.

Error Normal State
image image

How to set up and validate locally

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

  1. In rails console enable the experiment fully and create a model and model version

    Feature.enable(:model_registry)
    
    p = Project.find_by(id: 1)
    Ml::CreateModelService.new(p, "model_1").execute 
    version = Ml::FindOrCreateModelVersionService.new(p, { model_name: "model_1", version: "1.0.0" }).execute
    candidate = version.candidate
    Ml::CandidateParam.create!(candidate: candidate, name: 'param1', value:  'value1')
    Ml::CandidateMetadata.create!(candidate: candidate, name: 'metadata1', value:  'metadataValue1')
    Ml::CandidateMetric.create!(candidate: candidate, name: 'metric1', value:  0.3, step: 0)
  2. Visit the project where the model was created

  3. Click on Deploy > Model registry, and navigate to the created model

  4. Verify everything is rendered as previously

Related to #456111 (closed)

Edited by Eduardo Bonet

Merge request reports