Skip to content

Create Package during Model Version creation

Darby Frey requested to merge model-version-package-creation into master

What does this MR do and why?

This MR addresses the first part of CreateModelVersionService should also create pa... (#433103 - closed) by adding a step to the CreateModelVersionService to find or create the backend package entry in the DB. This change also wraps the service in a transaction since the process updates records in different table.

How to set up and validate locally

  1. In the Rails console, ensure the feature flag is enabled

    Feature.enable(:ml_experiment_tracking)
  2. In the Rails console, run the following to create a model and a model version:

    project = Project.last # or find a project locally you want to use
    model = Ml::CreateModelService.new(project, 'my-model').execute
    model.versions.create(version: '1.0.0', project: project)
  3. In the Rails console, use the CreateModelVersionService to create a new version of model.

    Ml::CreateModelVersionService.new(model).execute
    model.versions.last.package # package should exist

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 Darby Frey

Merge request reports

Loading