nvflare.app_common.utils.math_utils module

parse_compare_criteria(compare_expr: str | None = None) Tuple[str, float, Callable][source]

Parses the compare expression into individual component.

The compare expression is in the format of string literal : “<key> <op> <value>” such as

Parameters:

compare_expr – string literal in the format of “<key> <op> <value>”

Returns:

A Tuple of (key, value, operator)