That’s still weird and based on your experiments it seems the error is somehow created in the federated learning setup.
Could you remove the jit.script call and check the code again?
Also, if you are still stuck, could you please link me some tutorial on how to create your federated learning setup, so that I could have a look?