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

fix: Revert changes from PR#326 with trl version change #360

Closed
wants to merge 1 commit into from

Conversation

willmj
Copy link
Collaborator

@willmj willmj commented Oct 1, 2024

Description of the change

Setting trl to version 0.9.6 causes the following error:

if not args.packing:
            # If we aren't skipping data preparation, then a dataset_text_field
            # or formatting_func must be provided.
            if (
                args.dataset_text_field is None
                and formatting_func is None
                and dataset_kwargs is not None
                and "skip_prepare_dataset" in dataset_kwargs
                and dataset_kwargs["skip_prepare_dataset"]
            ):
>               raise ValueError(
                    "You passed `packing=False` to the SFTTrainer/SFTConfig, but you didn't pass a `dataset_text_field` or `formatting_func` argument."
                )
E               ValueError: You passed `packing=False` to the SFTTrainer/SFTConfig, but you didn't pass a `dataset_text_field` or `formatting_func` argument.

This PR is to temporarily revert the changes in PR #326 until Fabian's qlora fix is in the latest version of trl

Related issue number

How to verify the PR

Was the PR tested

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass

Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
Copy link

github-actions bot commented Oct 1, 2024

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@github-actions github-actions bot added the fix label Oct 1, 2024
@fabianlim
Copy link
Collaborator

@willmj what you pasted seems strange

The comments say that the raise is only when data prep is not skipped

# If we aren't skipping data preparation, then a dataset_text_field
 # or formatting_func must be provided.

But the code triggers when dataset_kwargs["skip_prepare_dataset"] is truthful, which is a contradiction because it should mean to skip the data prep

@willmj
Copy link
Collaborator Author

willmj commented Oct 1, 2024

@fabianlim misunderstood your original comment in #358, closing this PR

@willmj willmj closed this Oct 1, 2024
@willmj willmj deleted the revert-trl-fix branch October 1, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants