Repository navigation
Conversation
ale18V
force-pushed
the
refactor/aggregator-params
branch
7 times, most recently
from
November 12, 2026 14:37
9726da6 to
9f2fe66
Compare
ale18V
marked this pull request as ready for review
November 12, 2026 15:58
JulienVig
requested changes
Nov 13, 2026
JulienVig
left a comment
Collaborator
There was a problem hiding this comment.
I think this refactor is a good idea but I see a few blockers right now:
- The zod schema is too loose, it allows incorrect arguments without error, and doesn't let TypeScript narrow types correctly
- The CLI parsing is quite shaky, it looks like passing CLI argument as JSON would let us avoid reimplementing a possible incorrect CLI parser even if less convenient
- The CLI isn't clear about its API: what are the accepted parameters, and it doesn't fail clearly when passing incorrect arguments
Let me know what you think on keeping JSON arguments for the CLI
Collaborator
Author
By the way, regarding this, for sure JSON is more convenient for code, less convenient for CLI usage. |
ale18V
force-pushed
the
refactor/aggregator-params
branch
2 times, most recently
from
November 18, 2026 10:49
7dabd89 to
6cb20f5
Compare
ale18V
force-pushed
the
refactor/aggregator-params
branch
from
November 18, 2026 15:26
6cb20f5 to
736095d
Compare
JulienVig
self-requested a review
November 19, 2026 12:51
JulienVig
approved these changes
Nov 19, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Currently the local client trainer is decoupled from the aggregator, which is limiting to implementing more complex algorithms.
What
This PR unifies the configuration of aggregation strategies across
discojsand the CLI.Previously, aggregator parameters were scattered across ad-hoc fields like
privacy.byzantineFaultToleranceand rootmaxShareValue, causing CLI argument sprawl.This refactor introduces a typed
aggregationParamsschema discriminated byaggregationStrategyand a generic--aggregatorParamsCLI flag.Individual flags (
--clippingRadius,--beta,--maxIterations,--maxShareValue) are removed in favor of comma-separated key-value pairs, keeping argument parsing clean and extensible.TODO