DomainAdaptiveReID icon indicating copy to clipboard operation
DomainAdaptiveReID copied to clipboard

TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

Open Zeros12 opened this issue 5 years ago • 5 comments

Hi, thank you for nice work. I am getting the following error when I run source_train.py.

Files already downloaded and verified Market1501 dataset loaded subset | # ids | # images

train | 676 | 11744 val | 75 | 1192 trainval | 751 | 12936 query | 750 | 3368 gallery | 751 | 15913 Traceback (most recent call last): File "source_train.py", line 311, in main(parser.parse_args()) File "source_train.py", line 196, in main metric = DistanceMetric(algorithm=args.dist_metric) File "/home/DomainAdaptiveReID-master/reid/dist_metric.py", line 13, in init self.metric = get_metric(algorithm, *args, **kwargs) File "/home/DomainAdaptiveReID-master/reid/metric_learning/init.py", line 25, in get_metric return __factory[algorithm](*args, **kwargs) TypeError: Can't instantiate abstract class Euclidean with abstract methods get_metric, score_pairs

Zeros12 avatar Aug 03 '19 16:08 Zeros12

I also got the same error.

deep0learning avatar Aug 04 '19 11:08 deep0learning

Any way to resolve the error?

anilsh avatar Aug 07 '19 09:08 anilsh

Hi, this reposity uses metric_learn 0.3.0. It this the same with your settings?

lsongx avatar Aug 13 '19 18:08 lsongx

I used 0.2.0,0.3.0, or 0.4.0 to run and got another error :ImportError: cannot import name 'graph_lasso'

And if I use 0.5.0, 0.6.0, I still got error same as title.

HenryZhangJianhe avatar Jul 04 '20 14:07 HenryZhangJianhe

I fixd it as follow step scikit-learn 0.20.0 metric-learn 0.4.0

HenryZhangJianhe avatar Jul 04 '20 15:07 HenryZhangJianhe