Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Zeros12 opened this issue Aug 3, 2019 · 5 comments

Comments

@Zeros12
Copy link

Zeros12 commented Aug 3, 2019

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

@deep0learning
Copy link

I also got the same error.

@anilsh
Copy link

anilsh commented Aug 7, 2019

Any way to resolve the error?

@lsongx
Copy link
Owner

lsongx commented Aug 13, 2019

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

@HenryZhangJianhe
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants