diff --git a/Gemfile.lock b/Gemfile.lock index a331fd9..5e6acdf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - leva (0.1.6) + leva (0.1.7) liquid (~> 5.5.0) rails (>= 7.2.0) diff --git a/app/models/leva/runner_result.rb b/app/models/leva/runner_result.rb index 318ecd8..86695a3 100644 --- a/app/models/leva/runner_result.rb +++ b/app/models/leva/runner_result.rb @@ -39,18 +39,18 @@ class RunnerResult < ApplicationRecord # @return [Array] The parsed draft responses def parsed_predictions - @parsed_predictions ||= runner.parsed_predictions(self) + @parsed_predictions ||= runner&.parsed_predictions(self) || [] end # @return [String] The ground truth for this runner result def ground_truth - @ground_truth ||= runner.ground_truth(self) + @ground_truth ||= runner&.ground_truth(self) end private def runner - @runner ||= runner_class.constantize.new + @runner ||= runner_class&.constantize&.new end end end diff --git a/app/views/leva/workbench/_results_section.html.erb b/app/views/leva/workbench/_results_section.html.erb index cdf8045..b4ac7eb 100644 --- a/app/views/leva/workbench/_results_section.html.erb +++ b/app/views/leva/workbench/_results_section.html.erb @@ -42,7 +42,7 @@ <% if @dataset_record && (runner_result = @dataset_record.runner_results.last) %>

Ground Truth:

-
<%= @dataset_record.ground_truth %>
+
<%= runner_result.ground_truth %>

Raw Prediction:

diff --git a/lib/leva/version.rb b/lib/leva/version.rb index 4174552..4e40c39 100644 --- a/lib/leva/version.rb +++ b/lib/leva/version.rb @@ -1,3 +1,3 @@ module Leva - VERSION = "0.1.6" + VERSION = "0.1.7" end