Description
In the module polygraphy.tools.args.backend.trt.loader, the function add_loader_if_nondefault is defined with parameters (loader, result_var_name, **kwargs). The loader_name argument is not defined as a required positional parameter in its signature.
However, the function's first line calls make_invocable_if_nondefault_kwargs(loader, loader_name, **kwargs), which requires loader_name. This causes a runtime error because loader_name is not provided when the function is called later in the code, as seen in examples like:
python
loader_name = add_loader_if_nondefault(
"PostprocessNetwork",
f"postprocess_step_{i}",
func=pps,
name=f"{script_path}:{func_name}",
)
This is a bug because the function's interface does not match its implementation, leading to a missing argument error.
Polygraphy ver. 0.49.26