Class: RubyLLM::Contract::Eval::Report
- Inherits:
-
Object
- Object
- RubyLLM::Contract::Eval::Report
- Extended by:
- Forwardable
- Defined in:
- lib/ruby_llm/contract/eval/report.rb
Constant Summary collapse
- GENERIC_DETAILS =
["passed", "not passed"].freeze
- HISTORY_DIR =
".eval_history"- BASELINE_DIR =
".eval_baselines"
Instance Attribute Summary collapse
-
#dataset_name ⇒ Object
readonly
Returns the value of attribute dataset_name.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#step_name ⇒ Object
readonly
Returns the value of attribute step_name.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(dataset_name:, results:, step_name: nil) ⇒ Report
constructor
A new instance of Report.
Constructor Details
#initialize(dataset_name:, results:, step_name: nil) ⇒ Report
Returns a new instance of Report.
23 24 25 26 27 28 29 30 31 |
# File 'lib/ruby_llm/contract/eval/report.rb', line 23 def initialize(dataset_name:, results:, step_name: nil) @dataset_name = dataset_name @step_name = step_name @results = results.dup.freeze @stats = ReportStats.new(results: @results) @presenter = ReportPresenter.new(report: self, stats: @stats) @storage = ReportStorage.new(report: self, stats: @stats) freeze end |
Instance Attribute Details
#dataset_name ⇒ Object (readonly)
Returns the value of attribute dataset_name.
11 12 13 |
# File 'lib/ruby_llm/contract/eval/report.rb', line 11 def dataset_name @dataset_name end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
11 12 13 |
# File 'lib/ruby_llm/contract/eval/report.rb', line 11 def results @results end |
#step_name ⇒ Object (readonly)
Returns the value of attribute step_name.
11 12 13 |
# File 'lib/ruby_llm/contract/eval/report.rb', line 11 def step_name @step_name end |
Instance Method Details
#each(&block) ⇒ Object
33 34 35 |
# File 'lib/ruby_llm/contract/eval/report.rb', line 33 def each(&block) results.each(&block) end |