Skip to content

Commit

Permalink
RELEASE: 0.0.1a30
Browse files Browse the repository at this point in the history
  • Loading branch information
brucewlee committed Mar 2, 2024
1 parent 1ac2bd0 commit 82b4fd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion nutcracker/evaluator/engines/mcq_engine_gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ def is_correct(self, instance: MCQInstance) -> bool:
valid_options = [chr(ord('A') + i) for i in range(len(instance.options))]

# Filter logprobs for valid options and ignore missing logprob values
filtered_logprobs = [entry for entry in logprobs if entry[0] in valid_options and len(entry) > 1]
try:
filtered_logprobs = [entry for entry in logprobs if entry[0] in valid_options and len(entry) > 1]
except TypeError:
# if only first position token was given
logprobs = instance.model_response_logprobs
filtered_logprobs = [entry for entry in logprobs if entry[0] in valid_options and len(entry) > 1]

# If no valid logprobs are found, consider the response incorrect
if not filtered_logprobs:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from distutils.core import setup
from setuptools import find_packages

this_version='0.0.1a29-5'
this_version='0.0.1a30'

# python setup.py sdist
# python -m twine upload dist/*
Expand Down

0 comments on commit 82b4fd0

Please sign in to comment.