Skip to content

Commit

Permalink
Propagate args change fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IKACE committed Sep 19, 2022
1 parent 63fbfec commit 38c075a
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 13 deletions.
3 changes: 2 additions & 1 deletion examples/async_fl/async_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import torch

import fedscale.core.config_parser as parser
from fedscale.core import commons
from fedscale.core.aggregation.aggregator import Aggregator
from fedscale.core.channels import job_api_pb2
Expand Down Expand Up @@ -504,5 +505,5 @@ def event_monitor(self):
time.sleep(0.1)

if __name__ == "__main__":
aggregator = AsyncAggregator(args)
aggregator = AsyncAggregator(parser.args)
aggregator.run()
3 changes: 2 additions & 1 deletion examples/async_fl/async_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pickle

import fedscale.core.channels.job_api_pb2 as job_api_pb2
import fedscale.core.config_parser as parser
from fedscale.core.execution.executor import Executor
from fedscale.core.execution.rlclient import RLClient
from fedscale.core.logger.execution import *
Expand Down Expand Up @@ -167,5 +168,5 @@ def event_monitor(self):
self.client_ping()

if __name__ == "__main__":
executor = AsyncExecutor(args)
executor = AsyncExecutor(parser.args)
executor.run()
4 changes: 2 additions & 2 deletions examples/differential_privacy/customized_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from customized_client import Customized_Client

from fedscale.core.execution.executor import Executor
from fedscale.core.logger.execution import args
import fedscale.core.config_parser as parser

"""In this example, we only need to change the Client Component we need to import"""

Expand All @@ -21,6 +21,6 @@ def get_client_trainer(self, conf):
return Customized_Client(conf)

if __name__ == "__main__":
executor = Customized_Executor(args)
executor = Customized_Executor(parser.args)
executor.run()

4 changes: 2 additions & 2 deletions examples/dry_run/customized_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from customized_client import Customized_Client

from fedscale.core.execution.executor import Executor
from fedscale.core.logger.execution import args
import fedscale.core.config_parser as parser

"""In this example, we only need to change the Client Component we need to import"""

Expand All @@ -21,5 +21,5 @@ def get_client_trainer(self, conf):
return Customized_Client(conf)

if __name__ == "__main__":
executor = Customized_Executor(args)
executor = Customized_Executor(parser.args)
executor.run()
3 changes: 2 additions & 1 deletion examples/heterofl/customized_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import customized_fllibs
from customized_fllibs import make_param_idx

import fedscale.core.config_parser as parser
from fedscale.core.aggregation.aggregator import Aggregator
from fedscale.core.logger.aggragation import *

Expand Down Expand Up @@ -118,5 +119,5 @@ def combine_models(self):


if __name__ == "__main__":
aggregator = Customized_Aggregator(args)
aggregator = Customized_Aggregator(parser.args)
aggregator.run()
4 changes: 2 additions & 2 deletions examples/heterofl/customized_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from customized_client import Customized_Client
from customized_fllibs import init_model

from fedscale.core.config_parser import args
import fedscale.core.config_parser as parser
from fedscale.core.execution.executor import Executor


Expand All @@ -24,5 +24,5 @@ def init_model(self):


if __name__ == "__main__":
executor = Customized_Executor(args)
executor = Customized_Executor(parser.args)
executor.run()
5 changes: 3 additions & 2 deletions examples/poisoning_setting/customized_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

from customized_client import Customized_Client

import fedscale.core.config_parser as parser
from fedscale.core.execution.executor import Executor
from fedscale.core.logger.execution import args


"""In this example, we only need to change the Client Component we need to import"""

Expand All @@ -21,6 +22,6 @@ def get_client_trainer(self, conf):
return Customized_Client(conf)

if __name__ == "__main__":
executor = Customized_Executor(args)
executor = Customized_Executor(parser.args)
executor.run()

3 changes: 2 additions & 1 deletion examples/tensorflow_engine/tf_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import tensorflow as tf

import fedscale.core.config_parser as parser
from fedscale.core.aggregation.aggregator import Aggregator
from fedscale.core.logger.aggragation import *

Expand All @@ -29,5 +30,5 @@ def init_model(self):
}

if __name__ == "__main__":
aggregator = Customized_Aggregator(args)
aggregator = Customized_Aggregator(parser.args)
aggregator.run()
3 changes: 2 additions & 1 deletion examples/tensorflow_engine/tf_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import tensorflow as tf
from tf_client import Customized_Client

import fedscale.core.config_parser as parser
from fedscale.core.execution.executor import Executor
from fedscale.core.logger.execution import *

Expand Down Expand Up @@ -35,6 +36,6 @@ def init_model(self):


if __name__ == "__main__":
executor = Customized_Executor(args)
executor = Customized_Executor(parser.args)
executor.run()

0 comments on commit 38c075a

Please sign in to comment.