8000 Fixes for seq2seq model by brendan-ai2 · Pull Request #1808 · allenai/allennlp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Fixes for seq2seq model #1808

Merged
merged 5 commits into from
Sep 24, 2018
Merged

Conversation

brendan-ai2
Copy link
Contributor

@brendan-ai2 brendan-ai2 removed the request for review from matt-gardner September 21, 2018 18:47
@brendan-ai2
Copy link
Contributor Author

(Needs an extra test before review.)

Copy link
Contributor
@matt-gardner matt-gardner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brendan-ai2
Copy link
Contributor Author

Thanks!

I added a simple test for an issue that using get_final_encoder_states also solves (bidirectional encoders) and manually tested that the validation loss was improving by implementing a trivial autoencoder. Do we have any established patterns for testing that we don't regress training full models? Feels more like an integration test.

Let me know if it's worth having a test specific to the masking issue.

Copy link
Contributor
@matt-gardner matt-gardner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry, I think I started looking over the code before you unrequested your review, and approved it before seeing that you wanted me to wait. It still looks good =).)

I don't think we need any more specific test for the masking issue. It would be way more work than it's worth to make that actually testable in this model code, and the function you're calling already has its own unit tests.

And no, we don't have any tests that do larger tests of training models on real data. That might be nice to have, to run occasionally (nightly?), but we definitely don't want something that big in our PR CI.

def test_encoder_decoder_can_train_save_and_load(self):
self.ensure_model_can_train_save_and_load(
self.param_file,
overrides="{model: {encoder: {bidirectional: true}}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just change this in experiment.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to test with bidirectional set to both true and false. And, naturally, duplicating the config file wasn't very compelling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, ok. It looks like you can just add this as another method on the other class, too, instead of making a whole new class for this.

@brendan-ai2
Copy link
Contributor Author

(No worries!)

Thanks for the background on the tests. I filed #1813 so we can consider the periodic retraining.

@brendan-ai2 brendan-ai2 merged commit 546242f into allenai:master Sep 24, 2018
brendan-ai2 added a commit that referenced this pull request Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0