Class: Openlayer::Models::Projects::TestUpdateParams::Payload

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openlayer/models/projects/test_update_params.rb

Defined Under Namespace

Modules: Suggested Classes: Threshold

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: , archived: nil, description: nil, name: nil, suggested: nil, thresholds: nil) ⇒ Object

Parameters:



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/openlayer/models/projects/test_update_params.rb', line 21

class Payload < Openlayer::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute archived
  #   Whether the test is archived.
  #
  #   @return [Boolean, nil]
  optional :archived, Openlayer::Internal::Type::Boolean

  # @!attribute description
  #   The test description.
  #
  #   @return [Object, nil]
  optional :description, Openlayer::Internal::Type::Unknown, nil?: true

  # @!attribute name
  #   The test name.
  #
  #   @return [String, nil]
  optional :name, String

  # @!attribute suggested
  #
  #   @return [Boolean, Openlayer::Models::Projects::TestUpdateParams::Payload::Suggested, nil]
  optional :suggested, enum: -> { Openlayer::Projects::TestUpdateParams::Payload::Suggested }

  # @!attribute thresholds
  #
  #   @return [Array<Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold>, nil]
  optional :thresholds,
           -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Projects::TestUpdateParams::Payload::Threshold] }

  # @!method initialize(id:, archived: nil, description: nil, name: nil, suggested: nil, thresholds: nil)
  #   @param id [String]
  #
  #   @param archived [Boolean] Whether the test is archived.
  #
  #   @param description [Object, nil] The test description.
  #
  #   @param name [String] The test name.
  #
  #   @param suggested [Boolean, Openlayer::Models::Projects::TestUpdateParams::Payload::Suggested]
  #
  #   @param thresholds [Array<Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold>]

  # @see Openlayer::Models::Projects::TestUpdateParams::Payload#suggested
  module Suggested
    extend Openlayer::Internal::Type::Enum

    FALSE = false

    # @!method self.values
    #   @return [Array<Boolean>]
  end

  class Threshold < Openlayer::Internal::Type::BaseModel
    # @!attribute insight_name
    #   The insight name to be evaluated.
    #
    #   @return [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::InsightName, nil]
    optional :insight_name,
             enum: -> { Openlayer::Projects::TestUpdateParams::Payload::Threshold::InsightName },
             api_name: :insightName

    # @!attribute insight_parameters
    #   The insight parameters. Required only for some test subtypes. For example, for
    #   tests that require a column name, the insight parameters will be [{'name':
    #   'column_name', 'value': 'Age'}]
    #
    #   @return [Array<Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::InsightParameter>, nil]
    optional :insight_parameters,
             -> {
               Openlayer::Internal::Type::ArrayOf[Openlayer::Projects::TestUpdateParams::Payload::Threshold::InsightParameter]
             },
             api_name: :insightParameters,
             nil?: true

    # @!attribute measurement
    #   The measurement to be evaluated.
    #
    #   @return [String, nil]
    optional :measurement, String

    # @!attribute operator
    #   The operator to be used for the evaluation.
    #
    #   @return [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::Operator, nil]
    optional :operator, enum: -> { Openlayer::Projects::TestUpdateParams::Payload::Threshold::Operator }

    # @!attribute threshold_mode
    #   Whether to use automatic anomaly detection or manual thresholds
    #
    #   @return [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::ThresholdMode, nil]
    optional :threshold_mode,
             enum: -> { Openlayer::Projects::TestUpdateParams::Payload::Threshold::ThresholdMode },
             api_name: :thresholdMode

    # @!attribute value
    #   The value to be compared.
    #
    #   @return [Float, Boolean, String, Array<String>, nil]
    optional :value, union: -> { Openlayer::Projects::TestUpdateParams::Payload::Threshold::Value }

    # @!method initialize(insight_name: nil, insight_parameters: nil, measurement: nil, operator: nil, threshold_mode: nil, value: nil)
    #   Some parameter documentations has been truncated, see
    #   {Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold} for more
    #   details.
    #
    #   @param insight_name [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::InsightName] The insight name to be evaluated.
    #
    #   @param insight_parameters [Array<Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::InsightParameter>, nil] The insight parameters. Required only for some test subtypes. For example, for t
    #
    #   @param measurement [String] The measurement to be evaluated.
    #
    #   @param operator [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::Operator] The operator to be used for the evaluation.
    #
    #   @param threshold_mode [Symbol, Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::ThresholdMode] Whether to use automatic anomaly detection or manual thresholds
    #
    #   @param value [Float, Boolean, String, Array<String>] The value to be compared.

    # The insight name to be evaluated.
    #
    # @see Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold#insight_name
    module InsightName
      extend Openlayer::Internal::Type::Enum

      CHARACTER_LENGTH = :characterLength
      CLASS_IMBALANCE = :classImbalance
      EXPECT_COLUMN_A_TO_BE_IN_COLUMN_B = :expectColumnAToBeInColumnB
      COLUMN_AVERAGE = :columnAverage
      COLUMN_DRIFT = :columnDrift
      COLUMN_VALUES_MATCH = :columnValuesMatch
      CONFIDENCE_DISTRIBUTION = :confidenceDistribution
      CONFLICTING_LABEL_ROW_COUNT = :conflictingLabelRowCount
      CONTAINS_PII = :containsPii
      CONTAINS_VALID_URL = :containsValidUrl
      CORRELATED_FEATURES = :correlatedFeatures
      CUSTOM_METRIC = :customMetric
      DUPLICATE_ROW_COUNT = :duplicateRowCount
      EMPTY_FEATURES = :emptyFeatures
      FEATURE_DRIFT = :featureDrift
      FEATURE_PROFILE = :featureProfile
      GREAT_EXPECTATIONS = :greatExpectations
      GROUP_BY_COLUMN_STATS_CHECK = :groupByColumnStatsCheck
      ILL_FORMED_ROW_COUNT = :illFormedRowCount
      IS_CODE = :isCode
      IS_JSON = :isJson
      LLM_RUBRIC_V2 = :llmRubricV2
      LABEL_DRIFT = :labelDrift
      METRICS = :metrics
      NEW_CATEGORIES = :newCategories
      NEW_LABELS = :newLabels
      NULL_ROW_COUNT = :nullRowCount
      PP_SCORE = :ppScore
      QUASI_CONSTANT_FEATURES = :quasiConstantFeatures
      SENTENCE_LENGTH = :sentenceLength
      SIZE_RATIO = :sizeRatio
      SPECIAL_CHARACTERS = :specialCharacters
      STRING_VALIDATION = :stringValidation
      TRAIN_VAL_LEAKAGE_ROW_COUNT = :trainValLeakageRowCount

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    class InsightParameter < Openlayer::Internal::Type::BaseModel
      # @!attribute name
      #   The name of the insight filter.
      #
      #   @return [String]
      required :name, String

      # @!attribute value
      #
      #   @return [Object]
      required :value, Openlayer::Internal::Type::Unknown

      # @!method initialize(name:, value:)
      #   @param name [String] The name of the insight filter.
      #
      #   @param value [Object]
    end

    # The operator to be used for the evaluation.
    #
    # @see Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold#operator
    module Operator
      extend Openlayer::Internal::Type::Enum

      IS = :is
      GREATER = :>
      GREATER_OR_EQUALS = :">="
      LESS = :<
      LESS_OR_EQUALS = :"<="
      NOT_EQUALS = :"!="

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # Whether to use automatic anomaly detection or manual thresholds
    #
    # @see Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold#threshold_mode
    module ThresholdMode
      extend Openlayer::Internal::Type::Enum

      AUTOMATIC = :automatic
      MANUAL = :manual

      # @!method self.values
      #   @return [Array<Symbol>]
    end

    # The value to be compared.
    #
    # @see Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold#value
    module Value
      extend Openlayer::Internal::Type::Union

      variant Float

      variant Openlayer::Internal::Type::Boolean

      variant String

      variant -> { Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold::Value::StringArray }

      # @!method self.variants
      #   @return [Array(Float, Boolean, String, Array<String>)]

      # @type [Openlayer::Internal::Type::Converter]
      StringArray = Openlayer::Internal::Type::ArrayOf[String]
    end
  end
end

Instance Attribute Details

#archivedBoolean?

Whether the test is archived.

Returns:

  • (Boolean, nil)


31
# File 'lib/openlayer/models/projects/test_update_params.rb', line 31

optional :archived, Openlayer::Internal::Type::Boolean

#descriptionObject?

The test description.

Returns:

  • (Object, nil)


37
# File 'lib/openlayer/models/projects/test_update_params.rb', line 37

optional :description, Openlayer::Internal::Type::Unknown, nil?: true

#idString

Returns:

  • (String)


25
# File 'lib/openlayer/models/projects/test_update_params.rb', line 25

required :id, String

#nameString?

The test name.

Returns:

  • (String, nil)


43
# File 'lib/openlayer/models/projects/test_update_params.rb', line 43

optional :name, String

#suggestedBoolean, ...



48
# File 'lib/openlayer/models/projects/test_update_params.rb', line 48

optional :suggested, enum: -> { Openlayer::Projects::TestUpdateParams::Payload::Suggested }

#thresholdsArray<Openlayer::Models::Projects::TestUpdateParams::Payload::Threshold>?



53
54
# File 'lib/openlayer/models/projects/test_update_params.rb', line 53

optional :thresholds,
-> { Openlayer::Internal::Type::ArrayOf[Openlayer::Projects::TestUpdateParams::Payload::Threshold] }

Class Method Details

.valuesArray<Boolean>

Returns:

  • (Array<Boolean>)


# File 'lib/openlayer/models/projects/test_update_params.rb', line 75