nvflare.app_common.abstract.metric_comparator module

class MetricComparator[source]

Bases: object

abstract compare(a, b) int | float[source]

Compare two metric values. Metric values do not have to be numbers.

Parameters:
  • a – first metric value

  • b – second metric value

Returns: negative number if a < b; 0 if a == b; positive number if a > b.