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

ValueError: a must be greater than 0 unless no samples are taken #7

Closed
murmurelo111 opened this issue Oct 22, 2023 · 5 comments
Closed

Comments

@murmurelo111
Copy link

Hi, I met the problem when I run pck_spair_pascal.py
Would you mind to telling me how to fix the issue?
Thanks!
issue

@murmurelo111
Copy link
Author

image

@Junyi42
Copy link
Owner

Junyi42 commented Oct 22, 2023

Hi @murmurelo111,

Could you share how many samples (the --SAMPLE argument) you are using currently? It looks like this error is due to trying to randomly sample 0 pairs, which should be avoided by this line.

Thanks.

@murmurelo111
Copy link
Author

Hi @murmurelo111,

Could you share how many samples (the --SAMPLE argument) you are using currently? It looks like this error is due to trying to randomly sample 0 pairs, which should be avoided by this line.

Thanks.

I uesd 20
image

@Junyi42
Copy link
Owner

Junyi42 commented Oct 22, 2023

Hi @murmurelo111,

Thanks for the info. According to this issue, it is most likely that the pairs list is empty. Please check whether you have set the path to the dataset correctly.

Best.

@murmurelo111
Copy link
Author

Hi @murmurelo111,

Thanks for the info. According to this issue, it is most likely that the pairs list is empty. Please check whether you have set the path to the dataset correctly.

Best.

Thanks for reply! I have solved the problem by changing pairs = sorted(glob(f'{path}/PairAnnotation/{split}/*:{category}.json')) to pairs = sorted(glob(f'{path}/PairAnnotation/{split}/*_{category}.json'))

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

2 participants