Skip to content

Commit

Permalink
Remove old references to seeds, clean up objects
Browse files Browse the repository at this point in the history
  • Loading branch information
JMGaljaard committed Sep 4, 2022
1 parent dc866f4 commit f548e6a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
9 changes: 0 additions & 9 deletions configs/distributed_tasks/example_arrival_config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"experimentConfiguration": {
"randomSeed": [
1,
41,
42,
43,
430
]
},
"trainTasks": [
{
"type": "distributed",
Expand Down
6 changes: 5 additions & 1 deletion fltk/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion fltk/util/task/config/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]


Expand Down
1 change: 1 addition & 0 deletions fltk/util/task/generator/arrival_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion fltk/util/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f548e6a

Please sign in to comment.