Skip to content

Commit

Permalink
use parse signature for Predict forward method
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Jan 30, 2024
1 parent 46a1de0 commit 28b94f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _get_input_value(method: Callable[..., Any], *args: Any, **kwargs: Any) -> s
# instance for __call__ does include the self parameter.
method_signature = signature(method)
first_parameter_name = next(iter(method_signature.parameters), None)
signature_contains_self_parameter = first_parameter_name == "self"
signature_contains_self_parameter = first_parameter_name in ["self", "cls"]
bound_arguments = method_signature.bind(
*(
[None] # the value bound to the method's self argument is discarded below, so pass None
Expand Down

0 comments on commit 28b94f4

Please sign in to comment.