Skip to content

fl.ess describes the train aggregation but is read beside evaluate metrics #105

Description

@ajbarea

fl.round.ess is computed in ObservableFedAvg.aggregate_train over the train replies' num-examples, then attached to the round span in aggregate_evaluate alongside fl.loss and fl.accuracy.

Those two come from different client sets. fraction-train and fraction-evaluate are independent knobs, and flwr samples each phase separately, so even at the default 0.1 / 0.1 the round's train cohort and evaluate cohort are different draws. fl.ess and fl.clients are consistent with each other (both train-derived); fl.loss and fl.accuracy are not.

The docstring on effective_sample_size says so, but a Jaeger or Prometheus view reads the attributes off the span with no docstring in sight, and the natural reading of fl.ess next to fl.accuracy is that they describe the same aggregation.

Recommended fix

Emit the evaluate-side one too, and name both for their phase:

  • fl.round.train_ess — over aggregate_train weights, what produced the adapters.
  • fl.round.evaluate_ess — over aggregate_evaluate weights, what produced the reported loss/accuracy.

effective_sample_size and _num_examples already work on either; aggregate_evaluate receives the replies it needs. The change is where they are called, plus the span attributes and the two docs enumerations (docs/architecture.md, docs/getting-started.md).

Keeping fl.round.ess as an alias for the train figure is an option, though nothing depends on it yet — it shipped in #102.

Related: the evaluate-side ESS is the one that qualifies the accuracy number, so it pairs with #104.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions