Closed vnmabus closed 8 months ago
4e22af5 might be related. In addition to that, you could try logging:
.generics
at import time - one of them must be a genericI also had this same error a few days ago indirectly through Pandera. It got solved pinning the version of multimethod to 1.11. This is mentioned over here https://github.com/unionai-oss/pandera/issues/1500.
Maybe https://github.com/coady/multimethod/commit/8346c7629644248f3a73b49d2f9023e862225afb is related? I have spent a fair amount of time checking the code, but I'm over my head here.
4e22af5 might be related. In addition to that, you could try logging:
* the types at runtimes * the registered types in `.generics` at import time - one of them must be a generic
It seems that self.generics
is [(skfda.typing._metric.Metric[~Original], skfda.misc.metrics._utils.NormInducedMetric[typing.Union[numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], skfda.representation._functional_data.FData]], typing.Generic[~Original, ~Transformed])]
.
The error appears in _BaseGenericAlias.__subclasscheck__
with parameters self=skfda.typing._metric.Metric[~Original], cls=<class 'skfda.misc.metrics._lp_distances.LpDistance'>
.
The error appears in
_BaseGenericAlias.__subclasscheck__
with parametersself=skfda.typing._metric.Metric[~Original], cls=<class 'skfda.misc.metrics._lp_distances.LpDistance'>
.
Thanks, I'm confident this is fixed in main (4e22af5 and later). I'll add a regression test that's as close to Metric
as possible.
If anyone on this thread can test theirs against main, that would be appreciated.
Released v1.11.2.
I am having problems in my project with the new version 1.11.1.
In particular it seems that the following multimethod:
https://github.com/GAA-UAM/scikit-fda/blob/b43718a92bd7189e3c821913c6de447aaa25b291/skfda/misc/metrics/_utils.py#L140
is causing some kind of error due to generics:
I tried unsuccessfully to create a minimum example showing the error, but as the changes in the last version are few, maybe you do not need it to locate the error.