Skip to content

Commit

Permalink
took out some unsupported algos
Browse files Browse the repository at this point in the history
  • Loading branch information
joyce-yuan committed Aug 25, 2024
1 parent 42ca039 commit c9726c7
Showing 1 changed file with 0 additions and 86 deletions.
86 changes: 0 additions & 86 deletions src/configs/algo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,92 +62,6 @@
"exp_keys": [],
}


feddatarepr: ConfigType = {
"algo": "feddatarepr",
"exp_id": "test5",
"num_rep": 1,
"load_existing": False,

# Similarity params
"representation": "train_data", # "test_data", "train_data", "dreams"
"num_repr_samples": 16,
# "CTLR_KL" Collaborator is Teacher using Learner Representation
# "CTCR_KL" Collaborator is Teacher using Collaborator Representation - Default row
# "LTLR_KL" Collaborator is Learner using Learner Representation - Default column
# "CTAR_KL" Collaborator is Teacher using ALL Representations (from every other client)
# "train_loss_inv" : 1-loss/total
# "train_loss_sm": 1-softmax(losses)
"similarity_metric": "train_loss_inv",

# Memory params
"sim_running_average": 10,
"sim_exclude_first": (5, 5), # (first rounds, first rounds after T0)

# Clients selection
"target_users_before_T_0": 0, #feddatarepr_clients-1,
"target_users_after_T_0": 1,
"T_0": 10, # round after wich only target_users_after_T_0 peers are kept
# highest, lowest, [lower_exp]_sim_sampling, top_x, xth, uniform_rdm
"selection_strategy": "uniform_rdm",#"uniform_rdm",
#"eps_greedy": 0.1,
# "num_clients_top_x" : 1, # Ideally: size community-1
# "selection_temperature": 0.5, # For all strategy with temperature


# Consensus params
# "sim_averaging", "sim_of_sim", "vote_1hop", "affinity_propagation_clustering", "mean_shift_clustering", "club"
"consensus":"mean_shift_clustering",# "affinity_propagation_clustering",
# "affinity_precomputed": False, # If False similarity row are treated as data points and not as similarity values
# "club_weak_link_strategy": "own_cluster_and_pointing_to", #"own_cluster_and_pointing_to", pointing_to, own_cluster
# "vote_consensus": (2,2), #( num_voter, num_vote_per_voter)
# "sim_consensus_top_a": 3,

#"community_type": "dataset",
#"num_communities": len(domainnet_classes),

# Learning setup
"warmup_epochs": 5,
"epochs_per_round": 5,
"rounds_per_selection": 1, # Number of rounds before selecting new collaborator(s)
"rounds": 210,
"model": "resnet10",
"average_last_layer": True,
"mask_finetune_last_layer": False,
"model_lr": 1e-4,
"batch_size": 16,

# Dreams params
# "reprs_position": 0,
# "inp_shape": [3, 32, 32] ,
# "inv_lr": 1e-1,
# "inv_epochs": 500,
# "alpha_preds": 0.1,
# "alpha_tv": 2.5e-3,
# "alpha_l2": 1e-7,
# "alpha_f": 10.0,
#"dreams_keep_best": False, # Use reprs with lowest loss

"exp_keys": ["similarity_metric", "selection_strategy", "consensus"]
}
defkt: ConfigType = {
"algo": "defkt",
"exp_id": "defkt_test9",
"central_client": 1,
"mask_last_layer": False,
"fine_tune_last_layer": False,
"epochs_per_round": 5,
"rounds": 10,
"epochs": 10,
"model": "resnet10",
"model_lr": 1e-4,
"batch_size": 16,
"num_teachers": 1,
# params for model
"position": 0,
"inp_shape": [128, 3, 32, 32],
}

defkt: ConfigType = {
"algo": "defkt",
"exp_id": "defkt_test9",
Expand Down

0 comments on commit c9726c7

Please sign in to comment.