generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AttributeError: property 'tokenizer' of 'DPOTrainer' object has no setter #2161
Closed
2 of 4 tasks
Labels
🐛 bug
Something isn't working
Comments
Origin of error, this change: huggingface/transformers#32385 |
This bug is linked to the fact that Suggested migration plan:
def __init__(
...
tokenizer: Optional[PreTrainedTokenizerBase] = None,
processing_class: Optional[
Union[PreTrainedTokenizerBase, BaseImageProcessor, FeatureExtractionMixin, ProcessorMixin]
] = None,
...
):
if tokenizer is not None:
if processing_class is not None:
raise ValueError(
"You cannot specify both `tokenizer` and `processing_class` at the same time. Please use `processing_class`."
)
warnings.warn(
"`tokenizer` is now deprecated and will be removed in the future, please use `processing_class` instead.",
FutureWarning,
)
processing_class = tokenizer |
yes looks like a good solution |
Yes seems good to me, it is a shame that these lines are just duplicates from the Trainer class and there is no way to just inherit them.
|
18 tasks
This was referenced Oct 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
Information
Tasks
examples
folderReproduction
Expected behavior
To work, like before.
The text was updated successfully, but these errors were encountered: