Postprocessing Functions

Module: polygraphy.tools.args

class ComparatorPostprocessArgs[source]

Bases: BaseArgs

Comparator Postprocessing: applying postprocessing to outputs.

parse_impl(args)[source]

Parses command-line arguments and populates the following attributes:

postprocess

Maps postprocessing function names to dictionaries of output names mapped to parameters. For example, this could be something like:

{"top_k": {"output1": 5, "output2": 6}}
Type:

Dict[str, Dict[str, Any]]

add_to_script_impl(script, results_name)[source]
Parameters:

results_name (str) – The name of the variable containing results from Comparator.run().

Returns:

The name of the variable containing the post-processed results. This could be the same as the original name.

Return type:

str