Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gmftbyGMFTBY committed Nov 12, 2024
1 parent 5eca479 commit e04e04e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,5 @@ data/
example_data/*
!example_data/deepseek-67b-chat-hf-prediction.tgz
inference/outputs
*.tgz
prediction/*
8 changes: 5 additions & 3 deletions critic_bench/run_correction.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def evaluate_correction_sub(
'qa',
'summary',
'harmlessness'
]
],
fast_mode=False
):
# init the OpenAI API Key
openai.api_key = os.getenv("OPENAI_API_KEY")
Expand Down Expand Up @@ -165,16 +166,17 @@ def evaluate_correction_sub(

if __name__ == "__main__":
args = vars(parser_args())
args['fast_mode'] = eval(args['fast_mode'])
if args['obj'] == 'True':
evaluate_obj(
evaluate_correction_obj(
args['root_dir'],
args['prediction_dir'],
ignore_models=args['ignore_models'],
allow_models=args['allow_models'],
split=args['split']
)
else:
evaluate_sub(
evaluate_correction_sub(
args['root_dir'],
args['prediction_dir'],
args['evaluation_dir'],
Expand Down
2 changes: 1 addition & 1 deletion critic_bench/run_meta_feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def evaluate_meta_feedback_obj(

if __name__ == "__main__":
args = vars(parser_args())
evaluate_obj(
evaluate_meta_feedback_obj(
args['root_dir'],
args['prediction_dir'],
ignore_models=args['ignore_models'],
Expand Down

0 comments on commit e04e04e

Please sign in to comment.