harvardnlp / pytorch-struct

Fast, general, and tested differentiable structured prediction in PyTorch
http://harvardnlp.github.io/pytorch-struct
MIT License
1.11k stars 93 forks source link

Update examples to use newer torchtext APIs #122

Open erip opened 2 years ago

erip commented 2 years ago

I'm in the process of updating the pytorch benchmarks repo to use newer torchtext APIs. These benchmarks use an adapted version of this example notebook. If it makes sense, I'm happy to submit a PR to similarly update the examples here (and in other notebooks where relevant).

srush commented 2 years ago

Would love that.

erip commented 2 years ago

Great. There are some caveats about parity between features from legacy torchtext APIs and new ones, but they likely won't be of consequence for this repo. The biggest change is how bucketing works intra-batch now that BucketIterator is gone. Once the current PR has gotten reviewed and lands I'll cut a PR here too.