-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Upgrade applications/text_classifications/multi_class to use Trainer API #3679
Conversation
- `device`: 使用的设备,默认为`gpu`。 | ||
- `per_device_train_batch_size`: 每次训练每张卡上的样本数量。可根据实际GPU显存适当调小/调大此配置。 | ||
- `per_device_eval_batch_size`: 每次评估每张卡上的样本数量。可根据实际GPU显存适当调小/调大此配置。 | ||
|
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.
找不到save_strategy的参数说明,整体检查下使用的配置是否有欠缺
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.
因为支持了Trainer的原因,增加了大量可使用的参数. 所以这里只是说明了一些用户可能调整的主要参数。剩下的参数在文档中链接了TrainingArguments的参数文档,供用户查阅
--metric_for_best_model accuracy \ | ||
--load_best_model_at_end \ | ||
--evaluation_strategy epoch \ | ||
--save_strategy epoch |
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.
新增一个可配置参数--save_total_limit 1
,限制保存的epoch数
Addressed comments from @lugimzzz |
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.
LGTM
PR types
Function optimization
PR changes
Others
Description
Upgrade applications/text_classifications/multi_class to use Trainer API