nvflare.app_opt.pt.job_config.model module

class PTModel(model)[source]

Bases: object

PyTorch model wrapper.

If model is an nn.Module, add a PTFileModelPersistor with the model and a TFModelPersistor.

Parameters:

model (any) – model

add_to_fed_job(job, ctx)[source]

This method is used by Job API.

Parameters:
  • job – the Job object to add to

  • ctx – Job Context

Returns:

dictionary of ids of component added