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

get_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: cd42c45c06b71e5eb31c1bf445cd105089cd1488 (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 GetExperiment < 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