question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sampler unable in BucketIterator

See original GitHub issue

unable to use XLAs Distributed Data Sampler or any Multi-GPU training with BucketIterator because it doesnt have a sampler feature. train_iterator , valid_iterator = BucketIterator.splits((train_data, test_data), batch_size=batch_size, sort_within_batch=True, sort_key = lambda x: len(x.word_token), device=device)

so i am constraint to using only one GPU.

i used BucketIterator because it gives good batches with minimal padding, but the limiting scaling factor is a constraint.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:33 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
StephennFernandescommented, Mar 10, 2021

@zhangguanheng66 I was thinking of contributing to torchtext , is it possible ? … I would love to contribute

1reaction
zhangguanheng66commented, Feb 26, 2021

For this kind of questions, you can use people on Pytorch NLP forum

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyTorchText BucketIterator - George Mihaila
The purpose is to use an example text datasets and batch it using PyTorchText with BucketIterator and show how it groups text sequences...
Read more >
Can't Iterate Validation set using BucketIterator - nlp
I am facing an issue while using BucketIterator. Below is a code snippet to divide the data into the train and validation set....
Read more >
Can torchtext's BucketIterator pad all batches to the same ...
In order to do this, I need to know the maximum sequence length of my training data. The problem is that torchtext.data.BucketIterator does ......
Read more >
Better Batches with PyTorchText BucketIterator - Google Colab
The purpose is to use an example text datasets and batch it using PyTorchText with BucketIterator and show how it groups text sequences...
Read more >
torchnlp.samplers.bucket_batch_sampler - PyTorch-NLP
import math from torch.utils.data.sampler import BatchSampler from ... Background: ``BucketBatchSampler`` is similar to a ``BucketIterator`` found in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found