Class: Rafflesia::DatasetBenchmarkCohort

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/dataset_benchmark_cohort.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  kind: :kind,
  query_count: :query_count,
  record_set_artifact_id: :record_set_artifact_id,
  required_evidence_set_ids: :required_evidence_set_ids,
  target_count: :target_count,
  truth_artifact_id: :truth_artifact_id,
  truth_semantics: :truth_semantics
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ DatasetBenchmarkCohort

Returns a new instance of DatasetBenchmarkCohort.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 29

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @id = hash[:id]
  @kind = hash[:kind]
  @query_count = hash[:query_count]
  @record_set_artifact_id = hash[:record_set_artifact_id]
  @required_evidence_set_ids = (hash[:required_evidence_set_ids] || [])
  @target_count = hash[:target_count]
  @truth_artifact_id = hash[:truth_artifact_id]
  @truth_semantics = hash[:truth_semantics]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def id
  @id
end

#kindObject

Returns the value of attribute kind.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def kind
  @kind
end

#query_countObject

Returns the value of attribute query_count.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def query_count
  @query_count
end

#record_set_artifact_idObject

Returns the value of attribute record_set_artifact_id.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def record_set_artifact_id
  @record_set_artifact_id
end

#required_evidence_set_idsObject

Returns the value of attribute required_evidence_set_ids.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def required_evidence_set_ids
  @required_evidence_set_ids
end

#target_countObject

Returns the value of attribute target_count.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def target_count
  @target_count
end

#truth_artifact_idObject

Returns the value of attribute truth_artifact_id.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def truth_artifact_id
  @truth_artifact_id
end

#truth_semanticsObject

Returns the value of attribute truth_semantics.



19
20
21
# File 'lib/rafflesia/foundry/dataset_benchmark_cohort.rb', line 19

def truth_semantics
  @truth_semantics
end