Update VisionClassifierTrainer#48
Open
ReiiNoki wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello Yanis.
Recently I am taking a Pytorch course in Coursera "Advanced PyTorch Techniques and Applications" and the lecturer used your library for teaching in Module 5 of the course.
When I wrote the code following him I found a fatal problem from your library since it is now currently a beta version.
The problem came from VisionClassifierTrainer.
In the lastest version of library transfomers from huggingface, the class TrainingArguments now changes the keyword "evaluation_strategy" to “eval_strategy” thus your original code didn't work.
I have to change the keyword following the instruction of huggingface/transformers#7974 (comment).
After the change, my training can run but another error came out.
KeyError: "The
metric_for_best_modeltraining argument is set to 'eval_accuracy', which is not found in the evaluation metrics. The available evaluation metrics are: ['eval_loss']. Consider changing themetric_for_best_modelvia the TrainingArguments."I have to go back to read the code from transformers and found they now only support "loss" as the endword. Thus I changed "accuracy" to "loss" for eval_metrc.
Finally, I can run the training from the course.
Thank you very much for you to work on this easy-to-use library for us to learn Pytorch and deep learning.
I hope my PR could help you to update and maintain it.