nvflare.app_common.utils.math_utils module

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

Parse the compare expression into individual component compare expression is in the format of string literal : “<key> <op> <value” such as

accuracy >= 0.5 loss > 2.4

Parameters:

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

Returns: Tuple key, value, operator