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

Enable scoring in inference engine py #2543

Merged

Conversation

l-k-11235
Copy link
Contributor

@l-k-11235 l-k-11235 commented Dec 29, 2023

I have done this PR to score a list of strings with an LM model.
It can be use with this instruction:

score_results = inference_engine.score_list(tgt=tgts)

where tgts is the list of strings to be scored.


def _get_parser():
parser = ArgumentParser(description="run_wikitext-2_benchmark.py")
opts.config_opts(parser)
Copy link
Member

Choose a reason for hiding this comment

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

I just pushed a PR that includes config_opts in translate_opts you can remove it, sorry

@vince62s vince62s merged commit a987e7d into OpenNMT:master Jan 5, 2024
2 checks passed
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