You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a custom script for tf/fedopt_ctl with the example in my_new_home/NVFlare/examples/getting_started/tf. I commented out line 127 of the code in fedopt_ctl_10 , which should cause an error since num_trainable_weights is not defined, but strangely, I don't get any error and the execution continues.
To Reproduce
Steps to reproduce the behavior:
Copy fed_ctl_10.py.
In line 128 of tf_fl_script_runner_cifar10.py, change from fedopt_ctl_10 import FedOpt.
Execute the code.
Modify fed_ctl_10.py and commented out line 127 of the code.
Execute the code again.
Expected behavior
get the error num_trainable_weights is not defined
Desktop (please complete the following information):
falibabaei
changed the title
Changing custom script does not effect the run
Custom Script Changes Not Reflected During Execution in NVFlare
Nov 11, 2024
@falibabaei The root cause of this issue is because of the wrong indentation in your fedopt_ctl_10.py. The "def update_model(self, global_model: FLModel, aggr_result: FLModel):" has an extra indentation which makes this method unreachable. So your modified codes were not got executed.
I'm using a custom script for
tf/fedopt_ctl
with the example inmy_new_home/NVFlare/examples/getting_started/tf
. I commented out line 127 of the code infedopt_ctl_10
, which should cause an error sincenum_trainable_weights
is not defined, but strangely, I don't get any error and the execution continues.To Reproduce
Steps to reproduce the behavior:
fed_ctl_10.py
.tf_fl_script_runner_cifar10.py
, changefrom fedopt_ctl_10 import FedOpt
.fed_ctl_10.py
and commented out line 127 of the code.Expected behavior
get the error
num_trainable_weights
is not definedDesktop (please complete the following information):
Here are the custom code for fedopt and the logs before and after modification
fedopt_ctl_10.txt
fedopt_ctl_log_before_modification.txt
fedopt_ctl_log_after_modification.txt
The text was updated successfully, but these errors were encountered: