Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkpoint Ablation for Flamby #71

Merged
merged 14 commits into from
Nov 21, 2023
Merged

Conversation

emersodb
Copy link
Collaborator

Adding in the ability to perform "non-federated checkpointing" for the FLamby experiments. This facilitates the checkpoint ablation study that was added to the ICLR paper.

Fixed two small bugs as well. The first was the dataloader method name for APFL (had a typo) and the second was defaulting the auxiliary FENDA losses to zeros rather than None. This prevents using non-symmetric latent spaces in FENDA, because you need symmetric latent spaces for some the auxiliary losses and they are computed even if the coefficients are zero.

@emersodb emersodb changed the title Dbe/checkpoint ablation flamby Checkpoint Ablation for Flamby Nov 18, 2023
@@ -50,7 +54,7 @@ def __init__(
self.alpha_learning_rate = alpha_learning_rate
self.client_number = client_number

def get_dataloader(self, config: Config) -> Tuple[DataLoader, DataLoader]:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow a typo crept into this APFL client

@@ -23,9 +23,9 @@ def __init__(
metric_meter_type: MetricMeterType = MetricMeterType.AVERAGE,
checkpointer: Optional[TorchCheckpointer] = None,
temperature: Optional[float] = 0.5,
perfcl_loss_weights: Optional[Tuple[float, float]] = (0.0, 0.0),
cos_sim_loss_weight: Optional[float] = 0.0,
contrastive_loss_weight: Optional[float] = 0.0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these are not None, then some of these losses (at least perfcl) are still computed, but just "zeroed" out. This is problematic if you want to use asymmetric latent spaces in a FENDA architecture.

@yc7z
Copy link
Collaborator

yc7z commented Nov 21, 2023

Looks good to me. Only a few comments on some small typos

@emersodb
Copy link
Collaborator Author

Looks good to me. Only a few comments on some small typos

Thanks for pointing out the helper message. Will fix!

@emersodb emersodb merged commit 9c7f033 into main Nov 21, 2023
2 checks passed
@emersodb emersodb deleted the dbe/checkpoint_ablation_flamby branch November 21, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants