Closed canberk17 closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@lvwerra @lewtun
The book has the transformers version pinned, so I believe that should not be an issue?
Aah, fair point. I probably missed that detail while going through the chapter. I'll close this PR. Thanks for pointing it out. Also amazing content!
We have to change the way TrainingArguments are modified due to a recent update that made them immutable, as discussed in this thread.
Previously, we could directly modify the TrainingArguments like this:
However, since TrainingArguments are now immutable(#25435), we have to use the
replace
function from thedataclasses
module to modify its fields. The replace function creates a new object of the same type as the original, replacing fields with new values specified, as mentioned hereSo, the modification of TrainingArguments will now look like this: