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

Improvements to random sampling at decode time. #1174

Merged
merged 24 commits into from
Jan 14, 2019

Conversation

daphnei
Copy link
Contributor

@daphnei daphnei commented Jan 13, 2019

This pull request does the following things:

  • Fixes a bug introduced by Save fields instead of vocab #1132 which caused random sampling to fail when getting vocab.
  • Fixes issue with Add random sampling as alternative to beam search. #1157 that prevented random sampling code from running on CPU.
  • Adds a test case to pull_request_chk.sh to hopefully prevent such bugs in the future.
  • Adds a random seed option at decode time. This required refractoring the code from train_single.py which sets the random seed.

One other unrelated change: I swapped the references to max_shard_size in pull_request_chk.sh to shard_size because at least on my machine, the test script fails otherwise.

@vince62s
Copy link
Member

looks good thanks. However if you include such a test in the pull_request_check, maybe we can do something similar in travis.yml so that it catches random sampling too.
cheers.

@daphnei
Copy link
Contributor Author

daphnei commented Jan 14, 2019

Added.

@vince62s
Copy link
Member

merging, thanks

@vince62s vince62s merged commit 02b3976 into OpenNMT:master Jan 14, 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