-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Rewrite guides for fine-tuning with Datasets #13923
Rewrite guides for fine-tuning with Datasets #13923
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this! I have a general comment on the code samples. The >>>
are usually used to go with the doctest package, but it also requires to have ...
on all the lines not having >>>
, which is not the case here.
We should either pick if we want this guide to be enabled for the doctests (in which case we should add the ...) or not (in which case the >>>
just hurt readability and should be removed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The content looks great to me. I think there's a good opportunity to do something a bout doctests here, which would tremendously help in maintaining this guide.
We have setup doctests for a few files but we'll need to enable them for more files - @stevhliu let us know if you'd like us to walk you through how these work and how these are setup so that your work may be tested, which should greatly reduce the maintenance cost down the road.
Thank you, @stevhliu! |
What does this PR do?
This PR updates the current documentation for Fine-tuning with custom datasets. It removes the custom code for loading a dataset in favor of using the Datasets library for loading and preprocessing a dataset. The new guide also introduces the Keras method for compiling and fitting a model instead of using
TFTrainingArguments
andTFTrainer
.ValueError: No gradients provided for any variable
when callingmodel.fit
. @Rocketknight1 has provided a temporary solution where we setdummy_labels=True
intf_to_dataset
.This notebook contains all the code examples shown in the guide.
To do: