Skip to content

Commit

Permalink
[Feature] Update BailingLM/OpenAI verbose (#1568)
Browse files Browse the repository at this point in the history
* [Feature] 1. Update CoreBench Base\n 2. Fix lint issue in BalingAPI

* Update

* [Feature] Update API

* Update
  • Loading branch information
tonysy authored Sep 27, 2024
1 parent 7d50294 commit e8437db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions configs/eval_corebench_2409_base_objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
['drop', 'accuracy'],
['math', 'accuracy'],
['gsm8k', 'accuracy'],
['mathbench-t (average)', 'naive_average']
['mathbench-t (average)', 'naive_average'],
['GPQA_diamond', 'accuracy'],
['openai_humaneval', 'humaneval_pass@1'],
['IFEval', 'Prompt-level-strict-accuracy'],
Expand All @@ -101,7 +101,7 @@
['drop', 'accuracy'],
['math', 'accuracy'],
['gsm8k', 'accuracy'],
['mathbench-t (average)', 'naive_average']
['mathbench-t (average)', 'naive_average'],
['GPQA_diamond', 'accuracy'],
['openai_humaneval', 'humaneval_pass@1'],
['IFEval', 'Prompt-level-strict-accuracy'],
Expand Down Expand Up @@ -185,4 +185,4 @@
# PART 5 Utils Configuaration #
#######################################################################
base_exp_dir = 'outputs/corebench_2409_objective/'
work_dir = osp.join(base_exp_dir, 'chat_objective')
work_dir = osp.join(base_exp_dir, 'base_objective')
1 change: 0 additions & 1 deletion opencompass/models/bailing_api_oc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from retrying import retry
except ImportError:
retry = None
print('please install retrying by `pip install retrying`')

from opencompass.utils.prompt import PromptList

Expand Down
4 changes: 4 additions & 0 deletions opencompass/models/openai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ def _generate(self, input: PromptList | str, max_out_len: int,
if self.verbose:
self.logger.info(
'Successfully get response from OpenAI API')
try:
self.logger.info(responses)
except Exception as e: # noqa F841
pass
return responses.choices[0].message.content
except Exception as e:
self.logger.error(e)
Expand Down

0 comments on commit e8437db

Please sign in to comment.