-
Python version (
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi thanks for reaching out, yes there is a way to obtain the round number from within the PTLearner. It was a good idea to try looking at the FLContext, however if you see ScatterAndGather:221 the Instead we can look at ScatterAndGather:226 where the current round is set as a header on the shareable. This can be accessed from within PTLearner: Also do you mind elaborating on which validation metrics you are interested in capturing? Let me know if you have any more questions and I hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hello, first of all, thank you for the clear and comprehensive response. Regarding the validation metrics, in addition to accuracy and log loss, we have added precision, recall, f1 score, and calculated a confusion matrix. The idea of iterating over the number of rounds in ScatterAndGather was specifically to visualize on TensorBoard how the metrics improve with each round of the workflow. We have just tested and were able to correctly retrieve the number of rounds. Thank you for your assistance. |
Beta Was this translation helpful? Give feedback.
Hi thanks for reaching out, yes there is a way to obtain the round number from within the PTLearner. It was a good idea to try looking at the FLContext, however if you see ScatterAndGather:221 the
AppConstants.CURRENT_ROUND
is set as a private, meaning that this property is only visible to local components. Since the ScatterAndGather workflow is server-controlled, the PTLearner on the client will not be able to access this.Instead we can look at ScatterAndGather:226 where the current round is set as a header on the shareable. This can be accessed from within PTLearner:
current_round = shareable.get_header(AppConstants.CURRENT_ROUND)
Also do you mind elaborating on which validation metric…