Welcome to mirror list, hosted at ThFree Co, Russian Federation.

model_finder.rb « ml « projects « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9ef5dacb551454e145e4ee5bdbacbc7773095eab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Projects
  module Ml
    class ModelFinder
      def initialize(project)
        @project = project
      end

      def execute
        @project
          .packages
          .installable
          .ml_model
          .order_name_desc_version_desc
          .select_only_first_by_name
          .limit(100) # This is a temporary limit before we add pagination
      end
    end
  end
end