From f548e6aba23dc11827397329c0620849d6de9c56 Mon Sep 17 00:00:00 2001 From: JMGaljaard Date: Sun, 4 Sep 2022 12:17:09 +0200 Subject: [PATCH] Remove old references to seeds, clean up objects --- configs/distributed_tasks/example_arrival_config.json | 9 --------- fltk/launch.py | 6 +++++- fltk/util/task/config/parameter.py | 1 - fltk/util/task/generator/arrival_generator.py | 1 + fltk/util/task/task.py | 1 - 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/configs/distributed_tasks/example_arrival_config.json b/configs/distributed_tasks/example_arrival_config.json index 03ca4b51..e2a74aa8 100644 --- a/configs/distributed_tasks/example_arrival_config.json +++ b/configs/distributed_tasks/example_arrival_config.json @@ -1,13 +1,4 @@ { - "experimentConfiguration": { - "randomSeed": [ - 1, - 41, - 42, - 43, - 430 - ] - }, "trainTasks": [ { "type": "distributed", diff --git a/fltk/launch.py b/fltk/launch.py index b065a1f9..9cd2b7a6 100644 --- a/fltk/launch.py +++ b/fltk/launch.py @@ -98,7 +98,7 @@ def exec_orchestrator(args: Namespace = None, conf: DistributedConfig = None): logging.info("Starting Orchestrator, initializing resources....") if args.local: logging.info("Loading local configuration file") - config.load_kube_config() + # config.load_kube_config() else: logging.info("Loading in cluster configuration file") config.load_incluster_config() @@ -333,6 +333,10 @@ def launch_cluster(arg_path: Path, conf_path: Path, rank: Rank, nic: Optional[NI logging.info(f"Starting in cluster mode{' (locally)' if args.local else ''}.") logging.basicConfig(level=logging.DEBUG, datefmt='%m-%d %H:%M') + + # TODO: Set arrival seeds correctly, and launch experiments. + # TODO: Make sure to wait for experiments to complete. + # Set the seed for arrivals, torch seed is mostly ignored. Set the `arrival_seed` to a different value # for each repetition that you want to run an experiment with. init_reproducibility(conf.execution_config) diff --git a/fltk/util/task/config/parameter.py b/fltk/util/task/config/parameter.py index 5d8e78ad..b131d265 100644 --- a/fltk/util/task/config/parameter.py +++ b/fltk/util/task/config/parameter.py @@ -280,7 +280,6 @@ class ExperimentDescription: configurations for repetitions. See also JobDescription to define types of jobs, and ExperimentConfiguration to set the configuration of experiments. """ - experiment_configuration: ExperimentConfiguration train_tasks: List[JobDescription] diff --git a/fltk/util/task/generator/arrival_generator.py b/fltk/util/task/generator/arrival_generator.py index 2036dcaf..3cf99658 100644 --- a/fltk/util/task/generator/arrival_generator.py +++ b/fltk/util/task/generator/arrival_generator.py @@ -246,6 +246,7 @@ def run(self, duration: float): description: JobDescription for job_name, description in self.job_dict.items(): # TODO: Ensure seeds are set properly + raise NotImplementedError("Run is to be re-implemented for BatchedArrivals in an upcomming release") for repl, seed in enumerate(description.job_class_parameters.experiment_configuration.random_seed): replication_name = f"{job_name}_{repl}_{seed}" train_task = TrainTask(identity=replication_name, diff --git a/fltk/util/task/task.py b/fltk/util/task/task.py index d840b27f..6c1e242a 100644 --- a/fltk/util/task/task.py +++ b/fltk/util/task/task.py @@ -233,7 +233,6 @@ class FederatedArrivalTask(ArrivalTask): @staticmethod def build(arrival: Arrival, u_id: uuid.UUID, replication: int) -> T: - # TODO: Check type-maps task = FederatedArrivalTask( id=u_id, network=arrival.get_network(),