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.

[Discussion] Saving the field object

See original GitHub issue

Usage: The field object is critical to checkpointing as it provides:

  • tokenization
  • padding
  • numericalize

Having the ability to save the field object allows the user, given arbitrary text, to preprocess the text. The preprocessed text is then used with a checkpointed model. Then the output is predicted and interpreted without the output dictionary.

Problem: torch.save is implemented with pickle. The field object accepts lambdas for tokenization, preprocessing and postprocessing; therefore, cannot be pickled.

Key Points:

  • The vocab object needs to be pickled because the output of the model is uninterpretable without it.

Discussion: What is the right abstraction here? Should the vocab object be saved and the field object discarded? Is it appropriate to have the field object and the vocab object closely bound?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
leimaocommented, Nov 12, 2019

It is nearly 2020, so what is the official solution now? Thanks.

2reactions
PetrochukMcommented, Nov 12, 2019

This repository has stagnated since the main contributors @jekbradbury and @nelson-liu left the project. Due to the lack of contribution and stagnation in torchtext, the NLP open source community fragmented. There are now multiple NLP tools that are competing with each other:

With regard to me, I split off two years ago and started my own project: https://github.com/PetrochukM/PyTorch-NLP. I wanted to simplify the coupled torchtext objects into something more functional like PyTorch. This has greatly helped my personal productivity as a Deep Learning engineer at Apple, University of Washington, AI2, and WellSaid Labs.

Here is a comparison of the various tools: https://github.com/facebookresearch/pytext/issues/110

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable SAVE operation on field event - Sage X3
Hi. I want to activate a control on a field, during the "AFTER FIELD" event: if user insert a not valid character into...
Read more >
Saving a large OpenFOAM object -- CFD Online Discussion Forums
Dear FOAMers, I use an object of type Foam::meshSearch [1] to perform many (efficient) searches on a constant mesh in my program. However,...
Read more >
there is one object X and when trying save the record for particular ...
there is one object X and when trying save the record for particular field getting error as 'read only field', what is issue...
Read more >
Saving form with a lookup on custom object — Cloud Customer ...
Content I am making a .net application which is a contact form. all data (contact fields and contact custom fields) is saving except...
Read more >
Save me: Unable to update object — Xano Community
I'm trying to update an object field with some object but I'm getting an empty array as response.
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