Skip to content

Show Candidate data in Model Version

What does this MR do and why?

Adds candidate info to the model version, and updates the candidate detail presenter to use camelCase instead of snake_case since that has become the default on model registry. This MR does not change the UI.

Screenshots

Before After
Model Detail image image
Model Version Detail image image

How to set up and validate locally

  1. Enable the feature flag

    Feature.enable("model_registry")
  2. Create the data (in rails console):

    p = Project.find_by(id: 20) # or whatever project you want to use for testing
    model = Ml::FindOrCreateModelService.new(p, "model_1").execute
    
    model_version = Ml::FindOrCreateModelVersionService.new(p, { model_name: "model_1", version: "1.0.#{i}" }).execute 
    
    c = model_version.candidate
    
    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")
  3. Navigate to <your_project>/-/ml/models. Verify that metadata, params and metrics now appear in the Details section

  4. Select the version in the versions tab. . Verify that metadata, params and metrics now appear

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)

Edited by Eduardo Bonet

Merge request reports

Loading