p2pfl.learning.frameworks.pytorch.lightning_learner moduleΒΆ
Lightning Learner for P2PFL.
- class p2pfl.learning.frameworks.pytorch.lightning_learner.LightningLearner(model, data, self_addr='unknown-node', aggregator=None)[source]ΒΆ
Bases:
Learner
Learner with PyTorch Lightning.
- Parameters:
model (
P2PFLModel
) β The model of the learner.data (
P2PFLDataset
) β The data of the learner.self_addr (
str
) β The address of the learner.
- evaluate()[source]ΒΆ
Evaluate the model with actual parameters.
- Return type:
Dict
[str
,float
]- Returns:
The evaluation results.