Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify fields structure #1299

Merged
merged 2 commits into from
Feb 15, 2019
Merged

Conversation

flauted
Copy link
Contributor

@flauted flauted commented Feb 14, 2019

This reduces the fields object to dict[str, Field] in all cases.

On #1292 it came up that fields is sometimes dict[str, list[tuple[str, Field]]] and sometimes [list[tuple[str, Field]]. On the other hand, torchtext is (usually) using dict[str, Field].

I tested that you can:
Preprocess on master, train on PR.
Preprocess and train on master, translate on PR.
Preprocess and train on master, train from checkpoint on PR.
And pull request script checks against legacy formats.

So I think this is completely backwards compatible.

@flauted
Copy link
Contributor Author

flauted commented Feb 15, 2019

Blocked by #1301 .

@vince62s vince62s merged commit bd7096d into OpenNMT:master Feb 15, 2019
@flauted
Copy link
Contributor Author

flauted commented Feb 15, 2019

@vince62s that's going to break ensembling again. Travis didn't rerun so it didn't catch that it's broken.

@vince62s
Copy link
Member

Travis is running on master, so let's see after the rebuild.

@flauted
Copy link
Contributor Author

flauted commented Feb 15, 2019

Okay. I have the fix ready to go. It's just a matter of whether to put it in a new PR or revert this and add it.

@vince62s
Copy link
Member

sorry for this, new PR is easier.

@flauted flauted mentioned this pull request Feb 15, 2019
ItaySofer pushed a commit to ItaySofer/OpenNMT-py that referenced this pull request Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants