- Site: https://graphite.dev
- Docs: https://docs.graphite.dev/
- Stacked PRs allow you to easily work like so:
- Work on branch ACQ-000-part-A(which is based on master)
- Work on branch ACQ-000-part-B(which is based on part-A)
 
- Work on branch 
ACQ-000-part-A (which is based on master)ACQ-000-part-B (which is based on part-A)| # Note: ensure you have the latest version of Torchtext by running: pip install torchtext --upgrade | |
| rnn_model = text_data.get_model(opt_fn, 1500, bptt, emb_sz=em_sz, n_hid=nh, n_layers=nl, | |
| dropout=0.1, dropouti=0.65, wdrop=0.5, dropoute=0.1, dropouth=0.3) | |
| # ... | |
| rnn_model.data.test_dl.src.sort = False | |
| rnn_model.data.test_dl.src.sort_within_batch = False | |
| rnn_model.data.test_dl.src.shuffle = False | 
| from torchtext import data | |
| class DataFrameDataset(data.Dataset): | |
| def __init__(self, df, text_field, label_field, is_test=False, **kwargs): | |
| fields = [('text', text_field), ('label', label_field)] | |
| examples = [] | |
| for i, row in df.iterrows(): | |
| label = row.sentiment if not is_test else None | |
| text = row.text |