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

Problem:num_samples should be a positive integer value, but got num_samples=0 #93

Open
git-saner opened this issue Jan 9, 2023 · 2 comments

Comments

@git-saner
Copy link

File "D:/Pycharmprojects/BERT-NER-Pytorch/run_ner_crf.py", line 496, in
main()
File "D:/Pycharmprojects/BERT-NER-Pytorch/run_ner_crf.py", line 437, in main
global_step, tr_loss = train(args, train_dataset, model, tokenizer)
File "D:/Pycharmprojects/BERT-NER-Pytorch/run_ner_crf.py", line 34, in train
train_sampler = RandomSampler(train_dataset) if args.local_rank == -1 else DistributedSampler(train_dataset)
File "D:\anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\sampler.py", line 107, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

Process finished with exit code 1

@decorum1998
Copy link

Hava u solved this problem? Im in the same situation.

@luoshengmen98
Copy link

yep! I also met this problem if I used my dataset ! Please how to sovle the trouble!

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

3 participants