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.

How to set the max length for batches?

See original GitHub issue

Is there a way to use something like max_len argument: all text entries in a dataset longer than a certain length can be thrown out.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kylasecommented, Aug 7, 2019

You can pass in a Callable as filter_pred to Dataset (https://torchtext.readthedocs.io/en/latest/data.html#torchtext.data.Dataset). I have used this to remove certain examples that are not necessary.

0reactions
XinDongolcommented, Sep 16, 2019

You can pass in a Callable as filter_pred to Dataset (https://torchtext.readthedocs.io/en/latest/data.html#torchtext.data.Dataset). I have used this to remove certain examples that are not necessary.

Could you please provide more hints about this method (I am familiar with Callback)? Thanks a lot

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to limit a batch variable's length - Stack Overflow
If you mean "limit the length of a batch variable when it is read via SET /P command", then you may use the...
Read more >
Limit length of user input batch
For example: Enter message here (28 characters max):. Then of course the user can only put in 28 characters. Any ideas? Thanks!
Read more >
Maximum line length in a batch file... - Google Groups
If you configure AUTOEXEC.BAT and CONFIG.SYS correctly, you can use upto 255 characters at the command prompt, and 1024 characters in a Batch...
Read more >
1847487 - Length of batch number is limited to 10 characters
1847487 - Length of batch number is limited to 10 characters. Symptom. When you try create the batch within MSC1N or other transactions...
Read more >
MongoDB Limits and Thresholds
For featureCompatibilityVersion set to "4.2" or earlier, the maximum length of unsharded collections and views namespace remains 120 bytes and 100 bytes for ......
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