FederatedScope icon indicating copy to clipboard operation
FederatedScope copied to clipboard

Encapsulation of Trainer class

Open joneswong opened this issue 2 years ago • 0 comments

In our design, Trainer class is responsible for encapsulating much training and testing details. Thus, we'd better make it clear: what interfaces are needed for Client class to interact with a trainer. IMO, directly accessing a trainer's property (e.g., context) should be forbidden: https://github.com/alibaba/FederatedScope/blob/bc6eb8b6c590af75891dee7645563cffbd3c25dd/federatedscope/core/worker/client.py#L413

Only in this way can our users develop a trainer in their own ways, respecting these interfaces while totally ignoring our design of the base trainer.

joneswong avatar Jul 21 '22 03:07 joneswong