Skip to content

Support for SFTTrainer.evaluate() and SFTTrainer.predict() with null train_dataset#2004

Merged
lewtun merged 7 commits intohuggingface:mainfrom
Sohaib9920:fix-sfttrainer-null-dataset
Sep 13, 2024
Merged

Support for SFTTrainer.evaluate() and SFTTrainer.predict() with null train_dataset#2004
lewtun merged 7 commits intohuggingface:mainfrom
Sohaib9920:fix-sfttrainer-null-dataset

Conversation

@Sohaib9920
Copy link
Contributor

@Sohaib9920 Sohaib9920 commented Sep 1, 2024

What does this PR do?

Allow using SFTTrainer for only evaluation/prediction when train_dataset is None.

Resolves the exception and passes the sft_trainer test.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for extending the SFTTrainer to support evaluation-only @Sohaib9920! LGTM

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@lewtun lewtun merged commit d832492 into huggingface:main Sep 13, 2024
@Sohaib9920 Sohaib9920 deleted the fix-sfttrainer-null-dataset branch September 13, 2024 12:27
yxliu-TAMU pushed a commit to mincheolseong/ECEN743-GRPO-Project-Proposal that referenced this pull request Apr 20, 2025
…ull train_dataset (huggingface#2004)

* add null train_dataset check

* Fix pre-commit errors

---------

Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments