-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Update] Internal humaneval add (#1641)
* [Update] internal_humaneval_add * update
- Loading branch information
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
opencompass/configs/datasets/humaneval/internal_humaneval_gen_ce6b06.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from opencompass.openicl.icl_prompt_template import PromptTemplate | ||
from opencompass.openicl.icl_retriever import ZeroRetriever | ||
from opencompass.openicl.icl_inferencer import GenInferencer | ||
from opencompass.datasets import HumanevalDataset, HumanEvalEvaluator, humaneval_internal_v2_postprocess | ||
|
||
humaneval_reader_cfg = dict( | ||
input_columns=['prompt'], output_column='task_id', train_split='test') | ||
|
||
# TODO: allow empty output-column | ||
humaneval_infer_cfg = dict( | ||
prompt_template=dict( | ||
type=PromptTemplate, | ||
template='# Complete the following python code:\n{prompt}', | ||
), | ||
retriever=dict(type=ZeroRetriever), | ||
inferencer=dict(type=GenInferencer, max_out_len=512)) | ||
|
||
humaneval_eval_cfg = dict( | ||
evaluator=dict(type=HumanEvalEvaluator), | ||
pred_role='BOT', | ||
k=[1, 10, 100], # the parameter only for humaneval | ||
pred_postprocessor=dict(type=humaneval_internal_v2_postprocess), | ||
) | ||
|
||
humaneval_datasets = [ | ||
dict( | ||
abbr='openai_humaneval', | ||
type=HumanevalDataset, | ||
path='opencompass/humaneval', | ||
reader_cfg=humaneval_reader_cfg, | ||
infer_cfg=humaneval_infer_cfg, | ||
eval_cfg=humaneval_eval_cfg) | ||
] |
33 changes: 33 additions & 0 deletions
33
opencompass/configs/datasets/humaneval/internal_humaneval_gen_d2537e.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from opencompass.openicl.icl_prompt_template import PromptTemplate | ||
from opencompass.openicl.icl_retriever import ZeroRetriever | ||
from opencompass.openicl.icl_inferencer import GenInferencer | ||
from opencompass.datasets import HumanevalDataset, HumanEvalEvaluator, humaneval_internal_v1_postprocess | ||
|
||
humaneval_reader_cfg = dict( | ||
input_columns=['prompt'], output_column='task_id', train_split='test') | ||
|
||
# TODO: allow empty output-column | ||
humaneval_infer_cfg = dict( | ||
prompt_template=dict( | ||
type=PromptTemplate, | ||
template='Complete the following python code:\n{prompt}', | ||
), | ||
retriever=dict(type=ZeroRetriever), | ||
inferencer=dict(type=GenInferencer, max_out_len=512)) | ||
|
||
humaneval_eval_cfg = dict( | ||
evaluator=dict(type=HumanEvalEvaluator), | ||
pred_role='BOT', | ||
k=[1, 10, 100], # the parameter only for humaneval | ||
pred_postprocessor=dict(type=humaneval_internal_v1_postprocess), | ||
) | ||
|
||
humaneval_datasets = [ | ||
dict( | ||
abbr='openai_humaneval', | ||
type=HumanevalDataset, | ||
path='opencompass/humaneval', | ||
reader_cfg=humaneval_reader_cfg, | ||
infer_cfg=humaneval_infer_cfg, | ||
eval_cfg=humaneval_eval_cfg) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters