Skip to content

Commit

Permalink
Refactor evaluate_and_store method in Leva module to store experime…
Browse files Browse the repository at this point in the history
…nt and runner result
  • Loading branch information
kieranklaassen committed Aug 23, 2024
1 parent 44ad19c commit 7f44b59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/leva.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def evaluate(prediction, recordable)
# @param runner_result [Leva::RunnerResult] The runner result to evaluate.
# @return [Leva::EvaluationResult] The stored evaluation result.
def evaluate_and_store(experiment, runner_result)
@experiment = experiment
@runner_result = runner_result

# TODO: return parsed predfiction maybe?
score = evaluate(runner_result.prediction, runner_result.dataset_record.recordable)

EvaluationResult.create!(
Expand Down

0 comments on commit 7f44b59

Please sign in to comment.