FedML-AI / FedNLP

FedNLP: An Industry and Research Integrated Platform for Federated Learning in Natural Language Processing, Backed by FedML, Inc. The Previous Research Version is Accepted to NAACL 2022
223 stars 45 forks source link

Refactor Model class to Trainer class #8

Closed chaoyanghe closed 3 years ago

chaoyanghe commented 3 years ago

@yuchenlin To distinguish from Model(torch.Module), may I refactor the model class into xxxTrainer? In essence, the code you wrote is a trainer that handles train, eval, load, save, args, config, etc. In huggingface, they also call this kind of class as trainer:

https://github.com/huggingface/transformers/blob/master/src/transformers/trainer.py

yuchenlin commented 3 years ago

Not necessarily.