Skip to content

Fix completion info extraction for offline best-of-n and self-consistency#223

Open
smirnovlad wants to merge 1 commit into
mainfrom
fix/completion-info-extraction
Open

Fix completion info extraction for offline best-of-n and self-consistency#223
smirnovlad wants to merge 1 commit into
mainfrom
fix/completion-info-extraction

Conversation

@smirnovlad
Copy link
Copy Markdown
Collaborator

Summary

  • get_completion_info() was receiving List[str] (from detect_steps()) instead of List[StepCandidate] in offline best-of-n and self-consistency strategies, so the isinstance guard always returned defaults (None, False, False)
  • This caused context_limit_hit_rate and max_steps_hit_rate to always be 0 for these two strategies
  • Fix: capture completion info eagerly while StepCandidate objects are still available, store in trajectory dicts, and propagate through to final results

Test plan

  • Syntax check passes for both modified files
  • Run eval with offline_best_of_n on a small dataset, verify metrics.json reports correct context_limit_hit_count / max_steps_hit_count
  • Run eval with self_consistency on a small dataset, same check

…ency

get_completion_info() was receiving List[str] (from detect_steps()) instead
of List[StepCandidate], causing the isinstance guard to always return defaults.
This meant context_limit_hit_rate and max_steps_hit_rate were always 0.

Capture completion info eagerly while StepCandidate objects are still
available, store it in trajectory dicts, and propagate through to final
results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant