nvflare.edge.executors.et_edge_model_executor module
- class ETEdgeModelExecutor(et_model: DeviceModel, input_shape, output_shape, aggr_factory_id: str, max_model_versions: int, update_timeout=60)[source]
Bases:
EdgeModelExecutorInitializes an edge model executor for on-device training using ExecuTorch.
This constructor sets up the executor with a training-ready PyTorch model (wrapped to include loss computation), along with model input/output shapes and versioning/update control parameters.
- Parameters:
et_model (DeviceModel) – A PyTorch model wrapped for ExecuTorch export. See nvflare/edge/models/model.py for wrapping examples.
input_shape (tuple) – Shape of the input tensor (e.g., (1, 3, 224, 224)).
output_shape (tuple) – Shape of the label/output tensor (e.g., (1,) for class index).
aggr_factory_id (str) – Identifier used for selecting the model aggregation strategy.
max_model_versions (int) – Maximum number of model versions to retain or track.
update_timeout (int, optional) – Timeout in seconds for applying model updates. Defaults to 60.