Fix: `validate_input_col` for partial functions (#95067)
Fixes #95066
#### Proposed change:
do not call `str()` on a `Callable` to determine its name
#### Reasoning:
Please see https://github.com/pytorch/pytorch/issues/95066 for reasoning and examples
#### Effect:
* The code example given in https://github.com/pytorch/pytorch/issues/95066 now executes instantly.
* If invalid input is provided, the stacktrace now prints nicely as
```
ValueError: The function foo takes 1 parameters, but 2 are required.
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/95067
Approved by: https://github.com/NivekT, https://github.com/ejguan