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

Refactor ContrastiveDataset and ContrastiveDistillationDataset #579

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
trainer fixed to work with ContrastiveDataset iter method
  • Loading branch information
DemirTonchev committed Dec 25, 2024
commit 2d5e29b784b6573dba41ef9d814be7f32e051d54
2 changes: 1 addition & 1 deletion src/setfit/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def get_dataset(
args.sampling_strategy,
max_pairs=max_pairs,
)
dataset = Dataset.from_list(list(data_sampler))
dataset = Dataset.from_generator(data_sampler.__iter__)
loss = args.loss(self.model.model_body)

return dataset, loss
Expand Down