Skip to content

Commit

Permalink
add --port parameter for interactive learning (#5837)
Browse files Browse the repository at this point in the history
* fixrd a bug

* Run Black code formatter

* used add_server_arguments to get the port from cmd instead

* to remove unwanted print statement

* Revert "used add_server_arguments to get the port from cmd instead"

This reverts commit cf6ec6f.

* used add_server_argument to get the port from cmd for interactive

* Update rasa/core/training/interactive.py

Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>

* added changelog2

* added port argument

* fixed tests

Co-authored-by: Padma Nandhini <padmanandhini@gmail.com>
Co-authored-by: Tobias Wochinger <mail@tobias-wochinger.de>
  • Loading branch information
3 people authored May 23, 2020
1 parent 1ae1024 commit 6146f45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test_rasa_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def test_interactive_help(run: Callable[..., RunResult]):
output = run("interactive", "--help")

help_text = """usage: rasa interactive [-h] [-v] [-vv] [--quiet] [--e2e] [-m MODEL]
help_text = """usage: rasa interactive [-h] [-v] [-vv] [--quiet] [--e2e] [-p PORT] [-m MODEL]
[--data DATA [DATA ...]] [--skip-visualization]
[--conversation-id CONVERSATION_ID]
[--endpoints ENDPOINTS] [-c CONFIG] [-d DOMAIN]
Expand All @@ -35,7 +35,7 @@ def test_interactive_core_help(run: Callable[..., RunResult]):
[--conversation-id CONVERSATION_ID]
[--endpoints ENDPOINTS] [-c CONFIG] [-d DOMAIN]
[--out OUT] [--augmentation AUGMENTATION]
[--debug-plots]
[--debug-plots] [-p PORT]
[model-as-positional-argument]"""

lines = help_text.split("\n")
Expand Down Expand Up @@ -182,7 +182,9 @@ def test_pass_conversation_id_to_interactive_learning(monkeypatch: MonkeyPatch):

do_interactive_learning(args, Mock())

_serve_application.assert_called_once_with(ANY, ANY, True, expected_conversation_id)
_serve_application.assert_called_once_with(
ANY, ANY, True, expected_conversation_id, 5005
)


def test_generate_conversation_id_for_interactive_learning(monkeypatch: MonkeyPatch):
Expand Down

0 comments on commit 6146f45

Please sign in to comment.