FIX Bug in semantic search example (#2706)

Also updated requirements.

---------

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
This commit is contained in:
kaixuanliu
2025-08-05 17:49:00 +08:00
committed by GitHub
parent 2518ceeb15
commit ff12d13be6
2 changed files with 5 additions and 6 deletions

View File

@ -416,8 +416,7 @@ def main():
for epoch in range(starting_epoch, args.num_train_epochs):
model.train()
if args.with_tracking:
total_loss = 0
total_loss = 0
if args.resume_from_checkpoint and epoch == starting_epoch and resume_step is not None:
# We skip the first `n` batches in the dataloader when resuming from a checkpoint
active_dataloader = accelerator.skip_first_batches(train_dataloader, resume_step)

View File

@ -1,7 +1,7 @@
git+https://github.com/huggingface/peft
git+https://github.com/huggingface/accelerate
git+https://github.com/huggingface/transformers
datasets
peft
accelerate
transformers
datasets==2.18.0
evaluate
hnswlib
pandas