Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tastelikefeet committed Aug 9, 2024
1 parent 8f19185 commit 736c304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swift/llm/sft.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def llm_sft(args: SftArguments) -> Dict[str, Any]:
fsdp_flatten_parameters=False)

train_dataset, val_dataset = _get_train_val_dataset(args)
training_args.train_dataset_sample = train_dataset.shape[
0] if train_dataset is not None and not streaming else 0 # torchacc
if use_torchacc():
training_args.train_dataset_sample = train_dataset.shape[0] if train_dataset is not None else 0
template_kwargs = {}
template_kwargs['use_loss_scale'] = args.use_loss_scale
if args.loss_scale_config_path is not None:
Expand Down

0 comments on commit 736c304

Please sign in to comment.