clay-lab / transductions

A PyTorch framework for creating, running, and reproducing experiments on seq2seq models.
6 stars 3 forks source link

Fix TransductionDataset string representation #30

Closed jopetty closed 3 years ago

jopetty commented 3 years ago

Currently, the TransductionDataset has a rather unhelpful string representation, which is printed out using logging during each run:

[2020-11-23 17:55:42,181][core.trainer][INFO] - Dataset: TransductionDataset 
/Users/jacksonpetty/Documents/Development/transductions/data/experiments/alice-herself
/Users/jacksonpetty/Documents/Development/transductions/data/raw/grammar-1.tsv
cpu
<torchtext.data.field.Field object at 0x125f2b280>
<torchtext.data.field.Field object at 0x125f2b190>
<torchtext.data.field.Field object at 0x125f2b280>
{'train': <torchtext.data.iterator.BucketIterator object at 0x125f2b100>, 'gen': <torchtext.data.iterator.BucketIterator object at 0x126148430>, 'val': <torchtext.data.iterator.BucketIterator object at 0x125f2b550>, 'alice': <torchtext.data.iterator.BucketIterator object at 0x125e6bc70>, 'test': <torchtext.data.iterator.BucketIterator object at 0x125e901c0>}
[<torchtext.data.dataset.TabularDataset object at 0x125f2b490>, <torchtext.data.dataset.TabularDataset object at 0x126355df0>, <torchtext.data.dataset.TabularDataset object at 0x125e90700>]

This should be more informative.

jopetty commented 3 years ago

Kinda fixed in 7d768e4. Not sure what else should be added.