Skip to content

Refactors CandidateDetail to be reusable in Model Registry

What does this MR do and why?

Refactors CandidateDetail to be reusable in

  • Model registry expects json to be camelCased and not snake_cased.
  • separates on CandidateDetailPresenter present from present_as_json so that the data is reusable in other Components.
  • Adds prop to hide part of the rendered information about a candidate
  • Reduces the size of title dividers to match package registry/model registry

Other than reducing the size of title, this MR introduces no UX changes.

Before After
image image

How to set up and validate locally

How to set up and validate locally

  1. Create the data (in rails console):

    project_id = 1 # whatever project you want to use for testing
    p = Project.find_by(id: project_id) 
    e = Ml::Experiment.create!(project: p, name: "GitLab experiment")
    c = e.candidates.create(project: p)
    c.metrics.create(name: "AUC", value: 0.1, step: 0)
    c.metrics.create(name: "Accuracy", value: 0.2, step: 2)
    c.metrics.create(name: "Accuracy", value: 0.5, step: 3)
    c.metadata.create(name: "some name", value: "some data")
    c.params.create(name: "max-depth", value: "3")
  2. Navigate to your project, then Analyze > Model experiments. Select the experiment and then the candidate

  3. Verify that nothing changes visually when the code changes are applied

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #428905 (closed)

Merge request reports

Loading