Skip to content

Create ML model version GraphQL mutation

What does this MR do and why?

Create a new ML model version GraphQL mutation

Related to #462855 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before
image

How to set up and validate locally

  1. Enable model registry and create a model in a project
Feature.enable(:model_registry)
project = Project.find(26)
model = Ml::CreateModelService.new(project, 'FooModel20').execute.payload
puts model.id

2. Use   http://gdk.test:3000/-/graphql-explorer and create some versions

mutation { mlModelVersionCreate(input: { projectPath: "g1/p2", modelId: "gid://gitlab/Ml::Model/20" }) {

modelVersion{
  version
  id
  _links {
    showPath
    importPath
  }
}
errors

} }



3. Navigate to project and see under Deploy menu, "model registry" the new version for your model 

<!-- template sourced from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/merge_request_templates/Default.md -->

/assign me
Edited by Alper Akgun

Merge request reports