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

[BUG] Remove the hack that re-do the aggregation in fedeca robust mode #45

Open
jeandut opened this issue Aug 13, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jeandut
Copy link
Collaborator

jeandut commented Aug 13, 2024

Remove the hack in fedeca_core.py:

                    # Awful but hard to hack better
                    # compute_plan_keys[2] is a tuple with
                    # (scores, train_states, aggregate_states) in it
                    self.variance_matrix = sum(
                        [
                            e.algo._client_statistics["Qk"]
                            for e in self.compute_plan_keys[2][1].state
                        ]
                    )

And replace it with sthg like:

from substrafl.model_loading import download_aggregate_shared_state
self.variance_matrix = download_aggregate_shared_state(
            client=self.ds_client,
            compute_plan_key=compute_plan.key,
            round_idx=0,
        )

To test in simulation mode.

@jeandut jeandut added bug Something isn't working good first issue Good for newcomers labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant