-
Notifications
You must be signed in to change notification settings - Fork 128
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
Scorer model loading #860
Scorer model loading #860
Conversation
The interface IEncoderDecoder can now call graph loads directly from an Item Vector.
Scorers are created from an Item vector
1a83f84
to
e6574ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, only minor comments from me. Thanks! I will ask @emjotde to take a look too.
Please add an entry about the model-mmap option to CHANGELOG. |
This regression test fails for me with this PR:
It fails because logs no longer have the message saying This was tested after rebasing with the current master. That's the only regression test that fails. |
Thanks for looking at this @snukky. I believe this is expected, the That being said, I think it's a useful log message to include. I'll see where is best to reinstate it, and update this PR. |
I have reinstated the log messages for Amun and Nematus, which should fix the regression. |
Description
When creating scorers, there are two calls to loadItems:
getYamlFromModel
loads the 'special' YAML from the modelEncoderDecoder
method results in a call toExpressionGraph::load
This PR addresses these by calling
io::loadItems
in advance and passing the Item vector when creating scorers.getYamlFromModel
can now be called directly from an Item vectorScorerWrapper
can be constructed from an Item vector.Amun
andNematus
do some specific preprocessing before loading the graph, this PR moves that logic into a load from Items.Closes #831
List of changes:
--model-mmap
as a command line option (uses mio)IEncoderDecoder
to load from Item vectorAmun
andNematus
models load overload for Item vectorAdded dependencies: None
How to test
Used marian-conv to test mmap loading
Loading from Items passes regression tests
Checklist