Skip to content

Commit

Permalink
[Fix] change save_every defaults to 1 (open-compass#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
yingfhu authored Nov 15, 2023
1 parent eb9aa85 commit 32bf116
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions opencompass/openicl/icl_inferencer/icl_attack_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AttackInferencer(BaseInferencer):
gen_field_replace_token (:obj:`str`, optional): Used to replace the
generation field token when generating prompts.
save_every (:obj:`int`, optional): Save intermediate results every
`save_every` epochs.
`save_every` iters. Defaults to 1.
generation_kwargs (:obj:`Dict`, optional): Parameters for the
:obj:`model.generate()` method.
"""
Expand All @@ -58,7 +58,7 @@ def __init__(
gen_field_replace_token: Optional[str] = '',
output_json_filepath: Optional[str] = './icl_inference_output',
output_json_filename: Optional[str] = 'predictions',
save_every: Optional[int] = None,
save_every: Optional[int] = 1,
dataset_cfg: Optional[List[int]] = None,
**kwargs) -> None:
super().__init__(
Expand Down
4 changes: 2 additions & 2 deletions opencompass/openicl/icl_inferencer/icl_gen_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class GenInferencer(BaseInferencer):
gen_field_replace_token (:obj:`str`, optional): Used to replace the
generation field token when generating prompts.
save_every (:obj:`int`, optional): Save intermediate results every
`save_every` epochs.
`save_every` iters. Defaults to 1.
generation_kwargs (:obj:`Dict`, optional): Parameters for the
:obj:`model.generate()` method.
"""
Expand All @@ -50,7 +50,7 @@ def __init__(
gen_field_replace_token: Optional[str] = '',
output_json_filepath: Optional[str] = './icl_inference_output',
output_json_filename: Optional[str] = 'predictions',
save_every: Optional[int] = None,
save_every: Optional[int] = 1,
**kwargs) -> None:
super().__init__(
model=model,
Expand Down
4 changes: 2 additions & 2 deletions opencompass/openicl/icl_inferencer/icl_sc_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SCInferencer(BaseInferencer):
gen_field_replace_token (:obj:`str`, optional): Used to replace the
generation field token when generating prompts.
save_every (:obj:`int`, optional): Save intermediate results every
`save_every` epochs.
`save_every` iters. Defaults to 1.
generation_kwargs (:obj:`Dict`, optional): Parameters for the
:obj:`model.generate()` method.
sc_size (:obj:`int`, optional): Sample size for Self-Consistency
Expand All @@ -51,7 +51,7 @@ def __init__(
gen_field_replace_token: Optional[str] = '',
output_json_filepath: Optional[str] = './icl_inference_output',
output_json_filename: Optional[str] = 'predictions',
save_every: Optional[int] = None,
save_every: Optional[int] = 1,
sc_size: Optional[int] = 1,
infer_type: Optional[str] = '',
generation_kwargs: dict = {},
Expand Down
4 changes: 2 additions & 2 deletions opencompass/openicl/icl_inferencer/icl_tot_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ToTInferencer(GenInferencer):
gen_field_replace_token (:obj:`str`, optional): Used to replace the
generation field token when generating prompts.
save_every (:obj:`int`, optional): Save intermediate results every
`save_every` epochs.
`save_every` iters. Defaults to 1.
generation_kwargs (:obj:`Dict`, optional): Parameters for the
:obj:`model.generate()` method.
naive_run (:obj:`bool`): if True, run naive IO/CoT sampling instead of
Expand Down Expand Up @@ -74,7 +74,7 @@ def __init__(
gen_field_replace_token: Optional[str] = '',
output_json_filepath: Optional[str] = './icl_inference_output',
output_json_filename: Optional[str] = 'predictions',
save_every: Optional[int] = None,
save_every: Optional[int] = 1,
naive_run: bool = False,
prompt_wrapper: dict = {},
prompt_sample: str = 'standard',
Expand Down

0 comments on commit 32bf116

Please sign in to comment.