Class: Retab::ExperimentRun
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExperimentRun
- Defined in:
- lib/retab/experiment_runs/experiment_run.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, workflow_id: :workflow_id, workflow_version_id: :workflow_version_id, trigger: :trigger, experiment_id: :experiment_id, block_id: :block_id, block_type: :block_type, n_consensus: :n_consensus, lifecycle: :lifecycle, timing: :timing, parent_run_id: :parent_run_id, block_version_id: :block_version_id, metrics_validity_fingerprint: :metrics_validity_fingerprint, metrics_validity_fingerprint_version: :metrics_validity_fingerprint_version, definition_fingerprint: :definition_fingerprint, documents_fingerprint: :documents_fingerprint, score: :score, total_document_count: :total_document_count, completed_document_count: :completed_document_count, document_count: :document_count, error_count: :error_count }.freeze
Instance Attribute Summary collapse
-
#block_id ⇒ Object
Returns the value of attribute block_id.
-
#block_type ⇒ Object
Returns the value of attribute block_type.
-
#block_version_id ⇒ Object
Returns the value of attribute block_version_id.
-
#completed_document_count ⇒ Object
Returns the value of attribute completed_document_count.
-
#definition_fingerprint ⇒ Object
Returns the value of attribute definition_fingerprint.
-
#document_count ⇒ Object
Returns the value of attribute document_count.
-
#documents_fingerprint ⇒ Object
Returns the value of attribute documents_fingerprint.
-
#error_count ⇒ Object
Returns the value of attribute error_count.
-
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
-
#metrics_validity_fingerprint ⇒ Object
Returns the value of attribute metrics_validity_fingerprint.
-
#metrics_validity_fingerprint_version ⇒ Object
Returns the value of attribute metrics_validity_fingerprint_version.
-
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
-
#parent_run_id ⇒ Object
Returns the value of attribute parent_run_id.
-
#score ⇒ Object
Returns the value of attribute score.
-
#timing ⇒ Object
Returns the value of attribute timing.
-
#total_document_count ⇒ Object
Returns the value of attribute total_document_count.
-
#trigger ⇒ Object
Returns the value of attribute trigger.
-
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
-
#workflow_version_id ⇒ Object
Returns the value of attribute workflow_version_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExperimentRun
constructor
A new instance of ExperimentRun.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ExperimentRun
Returns a new instance of ExperimentRun.
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 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 56 def initialize(json) super() hash = self.class.normalize(json) @id = hash[:id] @workflow_id = hash[:workflow_id] @workflow_version_id = hash[:workflow_version_id] @trigger = hash[:trigger] ? Retab::ExperimentRunTrigger.new(hash[:trigger]) : nil @experiment_id = hash[:experiment_id] @block_id = hash[:block_id] @block_type = hash[:block_type] @n_consensus = hash[:n_consensus] @lifecycle = hash[:lifecycle] ? ( case hash[:lifecycle][:status] when "cancelled" Retab::CancelledWorkflowExperimentRun.new(hash[:lifecycle]) when "completed" Retab::CompletedWorkflowExperimentRun.new(hash[:lifecycle]) when "error" Retab::ErrorWorkflowExperimentRun.new(hash[:lifecycle]) when "pending" Retab::PendingWorkflowExperimentRun.new(hash[:lifecycle]) when "queued" Retab::QueuedWorkflowExperimentRun.new(hash[:lifecycle]) when "running" Retab::RunningWorkflowExperimentRun.new(hash[:lifecycle]) else hash[:lifecycle] end ) : nil @timing = hash[:timing] ? Retab::ExperimentRunTiming.new(hash[:timing]) : nil @parent_run_id = hash[:parent_run_id] @block_version_id = hash[:block_version_id] @metrics_validity_fingerprint = hash[:metrics_validity_fingerprint] @metrics_validity_fingerprint_version = hash[:metrics_validity_fingerprint_version] @definition_fingerprint = hash[:definition_fingerprint] @documents_fingerprint = hash[:documents_fingerprint] @score = hash[:score] @total_document_count = hash[:total_document_count] @completed_document_count = hash[:completed_document_count] @document_count = hash[:document_count] @error_count = hash[:error_count] end |
Instance Attribute Details
#block_id ⇒ Object
Returns the value of attribute block_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def block_id @block_id end |
#block_type ⇒ Object
Returns the value of attribute block_type.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def block_type @block_type end |
#block_version_id ⇒ Object
Returns the value of attribute block_version_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def block_version_id @block_version_id end |
#completed_document_count ⇒ Object
Returns the value of attribute completed_document_count.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def completed_document_count @completed_document_count end |
#definition_fingerprint ⇒ Object
Returns the value of attribute definition_fingerprint.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def definition_fingerprint @definition_fingerprint end |
#document_count ⇒ Object
Returns the value of attribute document_count.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def document_count @document_count end |
#documents_fingerprint ⇒ Object
Returns the value of attribute documents_fingerprint.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def documents_fingerprint @documents_fingerprint end |
#error_count ⇒ Object
Returns the value of attribute error_count.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def error_count @error_count end |
#experiment_id ⇒ Object
Returns the value of attribute experiment_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def experiment_id @experiment_id end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def id @id end |
#lifecycle ⇒ Object
Returns the value of attribute lifecycle.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def lifecycle @lifecycle end |
#metrics_validity_fingerprint ⇒ Object
Returns the value of attribute metrics_validity_fingerprint.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def metrics_validity_fingerprint @metrics_validity_fingerprint end |
#metrics_validity_fingerprint_version ⇒ Object
Returns the value of attribute metrics_validity_fingerprint_version.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def metrics_validity_fingerprint_version @metrics_validity_fingerprint_version end |
#n_consensus ⇒ Object
Returns the value of attribute n_consensus.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def n_consensus @n_consensus end |
#parent_run_id ⇒ Object
Returns the value of attribute parent_run_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def parent_run_id @parent_run_id end |
#score ⇒ Object
Returns the value of attribute score.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def score @score end |
#timing ⇒ Object
Returns the value of attribute timing.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def timing @timing end |
#total_document_count ⇒ Object
Returns the value of attribute total_document_count.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def total_document_count @total_document_count end |
#trigger ⇒ Object
Returns the value of attribute trigger.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def trigger @trigger end |
#workflow_id ⇒ Object
Returns the value of attribute workflow_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def workflow_id @workflow_id end |
#workflow_version_id ⇒ Object
Returns the value of attribute workflow_version_id.
32 33 34 |
# File 'lib/retab/experiment_runs/experiment_run.rb', line 32 def workflow_version_id @workflow_version_id end |