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

readd some privacy #712

Merged
merged 6 commits into from
Jul 23, 2024
Merged

readd some privacy #712

merged 6 commits into from
Jul 23, 2024

Conversation

tharvik
Copy link
Collaborator

@tharvik tharvik commented Jul 21, 2024

readding what was called differential privacy which is quite a bit harder to implement correctly (we need to know the variability of every features for one, and have a dedicated paper-based way to implement it, see #613).
I got lost along the way and changed more things, oupsi

  • reexpose privacy module, with addNoise and clipNorm doing what was doing goo'old DP
    • with tests™©®
    • enable it in mnist task via TrainingInformation.privacy
  • flatten DistributedTrainer, LocalTrainer, TrainerBuilder into a simple non-abstract Trainer
  • change discojs.Disco to a more straightfoward object
    • exposing only the contained Trainer and not Logger, Task and others
    • have a clearer code on where the model is taken from
    • ensure that it gets passed some valid client options
  • upgrade Aggregator to a real event emitter
    • avoid weird promises use (makeResult, receiveResult 👀)
    • drop Model link, everything goes through events now
    • drop mocking in server's tests
    • drop unused AsyncInformant

@tharvik tharvik marked this pull request as ready for review July 21, 2024 13:33
Copy link
Member

@martinjaggi martinjaggi left a comment

Choose a reason for hiding this comment

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

amazing PR, thanks so much. looks so much cleaner now and will be much easier to extend in the future. well done!

discojs/src/privacy.spec.ts Outdated Show resolved Hide resolved
discojs/src/privacy.spec.ts Outdated Show resolved Hide resolved
discojs/src/privacy.spec.ts Outdated Show resolved Hide resolved
discojs/src/privacy.ts Show resolved Hide resolved
discojs/src/privacy.ts Outdated Show resolved Hide resolved
discojs/src/training/trainer.ts Outdated Show resolved Hide resolved
discojs/src/privacy.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@JulienVig JulienVig left a comment

Choose a reason for hiding this comment

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

Great work! The codebase is getting cleaner and cleaner

@tharvik tharvik force-pushed the 613-readd-trivial-dp-tharvik branch from 7a3eb50 to 7730c4a Compare July 22, 2024 13:47
Base automatically changed from 694-decentralized-fail-julien to develop July 23, 2024 14:35
@tharvik tharvik force-pushed the 613-readd-trivial-dp-tharvik branch from 7730c4a to 92e4118 Compare July 23, 2024 15:54
@tharvik tharvik merged commit add9a2c into develop Jul 23, 2024
23 checks passed
@tharvik tharvik deleted the 613-readd-trivial-dp-tharvik branch July 23, 2024 15:59
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.

3 participants