Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] change save_every defaults to 1 #592

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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