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

experiment.rb « mlflow « ml « entities « api « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cfe366feaabf147049fe88b65124d37b981b83d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module API
  module Entities
    module Ml
      module Mlflow
        class Experiment < Grape::Entity
          expose :experiment do
            expose :experiment_id
            expose :name
            expose :lifecycle_stage
            expose :artifact_location
          end

          private

          def lifecycle_stage
            object.deleted_on? ? 'deleted' : 'active'
          end

          def experiment_id
            object.iid.to_s
          end
        end
      end
    end
  end
end