Skip to content

Commit

Permalink
Update config_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanghy-sketchzh authored Nov 3, 2023
1 parent 4d7b38e commit dfde6a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dbgpt_hub/llm_base/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def parse_infer_args(


def get_train_args(
args: Optional[Dict[str, Any]] = None
args: Optional[Dict[str, Any]] = None,
data_args_init: bool = True
) -> Tuple[
ModelArguments,
DataArguments,
Expand Down Expand Up @@ -121,7 +122,8 @@ def get_train_args(
transformers.utils.logging.enable_explicit_format()

# Check arguments (do not check finetuning_args since it may be loaded from checkpoints)
data_args.init_for_training()
if data_args_init:
data_args.init_for_training()

if training_args.max_steps == -1 and data_args.streaming:
raise ValueError("Please specify `max_steps` in streaming mode.")
Expand Down

0 comments on commit dfde6a2

Please sign in to comment.