Use JSON serialization for Sklearn and PyTorch model parameters
PyTorch and SkLearn model parameters are serialized differently after the training/aggregation including the additional information such as node_id
, researcher_id
etc. Using same serialization will be easy for the framework generic classes that might need to use some of the parameters that are sent from researcher to nodes or nodes for researcher such as optimizer state/auxiliary variables.
-
Usedeclearn
'sVector
class (unpack
andpack
methods) to convert model parameters to a dictionary. This part can be implemented inTrainingPlan
or inModel
class, see: #472 (closed) [ ]Round
class: Addnode_id
,researcher_id
etc to the dictionary, serialize and send back to researcher.[ ]Job
class: same asRound class
Please see #481 (comment 806933) for detailed implementation