Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logprobs eval #62

Merged
merged 2 commits into from
Jan 15, 2024
Merged

Logprobs eval #62

merged 2 commits into from
Jan 15, 2024

Conversation

chanind
Copy link
Collaborator

@chanind chanind commented Jan 12, 2024

This PR takes some of the ideas from in #56 and formalizes them in our architecture with tests to make this sort of eval easy moving forward. Specifically, this adds the following:

  • Adds the awesome make_dataset() changes from @dtch1997 and adds test coverage around the splitting behavior
  • Adds a Pipeline.calculate_output_logprobs() method based on the code in the the Jupyter notebook in Truthful QA benchmark #56, and adds test coverage.
  • Adds a MultipleChoiceAccuracyEvaluator which implements the accuracy calculation from the Jupyter notebook using logprobs within our Benchmark framework, including test coverage.
  • Adds the hardcoded TQA data from the notebook.

This PR also changes our EvalPrediction and Evaluator types to support logprobs. Now, each Evaluator must specify if it requires_generation or requires_probs to indicate to the benchmark what needs to be run. The benchmark will run generation and/or calculate probabilties as required by evaluators.

I also moved the make_dataset() stuff from data/__init__.py into data/make_dataset.py to make it easier to test.

@chanind chanind requested a review from dtch1997 January 12, 2024 18:45
@dtch1997
Copy link
Owner

Overall LGTM! Great work implementing the MCQ-style log prob evaluation as well as expanding the test coverage

@dtch1997 dtch1997 merged commit 8d07688 into main Jan 15, 2024
2 checks passed
@chanind chanind deleted the logprobs-eval branch January 15, 2024 17:30
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.

2 participants