Skip to content

Commit

Permalink
Merge pull request #1129 from jstriebel/patch-1
Browse files Browse the repository at this point in the history
Allow to run evaluate script from other code via main function.
  • Loading branch information
tmbo committed Jun 1, 2018
2 parents 271cebf + 2fc65b7 commit 35a53a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rasa_nlu/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def return_entity_results(results, dataset_name):
return_results(result, dataset_name)


if __name__ == '__main__': # pragma: no cover
def main():
parser = create_argument_parser()
cmdline_args = parser.parse_args()

Expand Down Expand Up @@ -723,3 +723,7 @@ def return_entity_results(results, dataset_name):
run_evaluation(cmdline_args.data, cmdline_args.model)

logger.info("Finished evaluation")


if __name__ == '__main__': # pragma: no cover
main()

0 comments on commit 35a53a1

Please sign in to comment.