Class: Retab::ExperimentSummaryMetricsResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExperimentSummaryMetricsResponse
- Defined in:
- lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ experiment_id: :experiment_id, run_id: :run_id, kind: :kind, view: :view, definition_fingerprint: :definition_fingerprint, block_type: :block_type, score: :score, prior_score: :prior_score, documents: :documents, aggregate: :aggregate, prior_run_id: :prior_run_id }.freeze
Instance Attribute Summary collapse
-
#aggregate ⇒ Object
Returns the value of attribute aggregate.
-
#block_type ⇒ Object
Returns the value of attribute block_type.
-
#definition_fingerprint ⇒ Object
Returns the value of attribute definition_fingerprint.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#prior_run_id ⇒ Object
Returns the value of attribute prior_run_id.
-
#prior_score ⇒ Object
Returns the value of attribute prior_score.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#score ⇒ Object
Returns the value of attribute score.
-
#view ⇒ Object
Returns the value of attribute view.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExperimentSummaryMetricsResponse
constructor
A new instance of ExperimentSummaryMetricsResponse.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ExperimentSummaryMetricsResponse
Returns a new instance of ExperimentSummaryMetricsResponse.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 35 def initialize(json) hash = self.class.normalize(json) @experiment_id = hash[:experiment_id] @run_id = hash[:run_id] @kind = hash[:kind] @view = hash[:view] @definition_fingerprint = hash[:definition_fingerprint] @block_type = hash[:block_type] @score = hash[:score] @prior_score = hash[:prior_score] @documents = (hash[:documents] || []).map { |item| item ? Retab::ExperimentSummaryMetricDocument.new(item) : nil } @aggregate = hash[:aggregate] ? Retab::ExperimentExtractSummaryAggregate.new(hash[:aggregate]) : nil @prior_run_id = hash[:prior_run_id] end |
Instance Attribute Details
#aggregate ⇒ Object
Returns the value of attribute aggregate.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def aggregate @aggregate end |
#block_type ⇒ Object
Returns the value of attribute block_type.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def block_type @block_type end |
#definition_fingerprint ⇒ Object
Returns the value of attribute definition_fingerprint.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def definition_fingerprint @definition_fingerprint end |
#documents ⇒ Object
Returns the value of attribute documents.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def documents @documents end |
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def experiment_id @experiment_id end |
#kind ⇒ Object
Returns the value of attribute kind.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def kind @kind end |
#prior_run_id ⇒ Object
Returns the value of attribute prior_run_id.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def prior_run_id @prior_run_id end |
#prior_score ⇒ Object
Returns the value of attribute prior_score.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def prior_score @prior_score end |
#run_id ⇒ Object
Returns the value of attribute run_id.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def run_id @run_id end |
#score ⇒ Object
Returns the value of attribute score.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def score @score end |
#view ⇒ Object
Returns the value of attribute view.
22 23 24 |
# File 'lib/retab/experiment_run_metrics/experiment_summary_metrics_response.rb', line 22 def view @view end |