Repository: pykeen/pykeen
Issue: TypeError: Too few arguments for FunctionResolver when importing pykeen.models
Root cause: Interface Contract Mismatch

### Describe the bug

## Summary:
When attempting to import the `pykeen.models` package (e.g. via `import pykeen.models`), the import fails deep in the triples utilities due to a generic-typing mismatch:

```python
>>> import pykeen.models
Traceback (most recent call last):
  …
TypeError: Too few arguments for <class 'class_resolver.func.FunctionResolver'>; actual 1, expected at least 2
```



### How to reproduce

```python
>>> import pykeen.models
```

### Environment

On `master` of the latest checkout from `pykeen` ... running `python -m pykeen version` also produces the error... but with the fix (incoming PR) 

| Key             | Value                    |
|-----------------|--------------------------|
| OS              | posix                    |
| Platform        | Linux                    |
| Release         | 4.15.0-213-generic       |
| Time            | Tue Apr 22 14:14:00 2025 |
| Python          | 3.12.8                   |
| PyKEEN          | 1.11.1-dev               |
| PyKEEN Hash     | a8bde130                 |
| PyKEEN Branch   | master                   |
| PyTorch         | 2.6.0+cu124              |
| CUDA Available? | false                    |
| CUDA Version    | 12.4                     |
| cuDNN Version   | 90100                    |

### Additional information

The error originates in `pykeen/triples/utils.py` at the line initializing `PREFIX_IMPORTER_RESOLVER` via `FunctionResolver.from_entrypoint(...).`

The `FunctionResolver` class (from the `class_resolver` package) is defined as a generic requiring at least _two_ type arguments, but it is invoked with only one. This mismatch triggers Python’s generic-parameter validation in typing_extensions (notably on Python 3.12+).

### Issue Template Checks

- [x] This is not a feature request (use a different issue template if it is)
- [x] This is not a question (use the [discussions](https://github.com/pykeen/pykeen/discussions/new) forum instead)
- [x] I've read the text explaining why including environment information is important and understand if I omit this information that my issue will be dismissed

thanks for picking up on this @danodonovan. I just updated `class-resolver` with more modern type annotations, but have made a big 'ol mess for anyone who didn't version cap 😅 

PR welcome, if not I will take care of this.

---

E.g.,

https://github.com/pykeen/pykeen/blob/a8bde1307e7004b40197570acd62cefa0e3c8c95/src/pykeen/nn/init.py#L497

which is based on 

https://github.com/pykeen/pykeen/blob/a8bde1307e7004b40197570acd62cefa0e3c8c95/src/pykeen/typing.py#L82

needs to get rewritten as 

```python
initializer_resolver: FunctionResolver[[FloatTensor], FloatTensor] = FunctionResolver( 
```

Ah sorry - I missed this, my PR #1541 duplicates your work and misses a key point, I'll close it now 🙌 

> Ah sorry - I missed this, my PR [#1541](https://github.com/pykeen/pykeen/pull/1541) duplicates your work and misses a key point, I'll close it now 🙌

please don't, I am much happier to accept your PR! Thank you for putting in the time and effort and I want to make sure that gets acknowledged :)

@danodonovan btw I see you're at HealX - I am always bumping into Nathan Brown at conferences and we never manage to make some good follow-ups. If you ever want a PyKEEN talk at work, please let me know