Skip to content

Commit

Permalink
Update docs/about/features_index/workflowinterface.rst
Browse files Browse the repository at this point in the history
Review comments incorporated.

Co-authored-by: Patrick Foley <[email protected]>
Signed-off-by: Parth Mandaliya <[email protected]>
  • Loading branch information
ParthMandaliya and psfoley committed Jun 13, 2024
1 parent aa6f790 commit 0930a5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/about/features_index/workflowinterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ Let's break this down, starting with the :code:`Aggregator` and :code:`Collabora

In the above :code:`FederatedFlow`, each collaborator accesses train and test datasets via *private attributes* :code:`train_loader` and :code:`test_loader`. These *private attributes* need to be set in form of a dictionary(user defined), where the key is the name of the attribute and the value is the object. In this example :code:`collaborator.private_attributes` sets the collaborator *private attributes* :code:`train_loader` and :code:`test_loader` that are accessed by collaborator steps (:code:`aggregated_model_validation`, :code:`train` and :code:`local_model_validation`).

There is another way of initializing private attributes in which *private attributes* need to be set using a (user defined) callback function while instantiating the participant.
While setting *private attributes* directly through a dictionary is the preferred method, this requires an object to be initialized before the flow begins execution.
In rare cases this can be a problem because certain python objects cannot be serialized. To compensate for these cases, users can delay the *private attributes* object initialization via the use of a callback:

.. code-block:: python
Expand Down

0 comments on commit 0930a5a

Please sign in to comment.