Skip to content

Commit

Permalink
Incorporate feedback (#4493)
Browse files Browse the repository at this point in the history
Incorporate feedback
  • Loading branch information
msamogh committed Sep 19, 2019
2 parents 07e5c46 + d1eddd3 commit c41144c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/_static/spec/rasa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ paths:
type: string
description: Path of the loaded model
example: 20190429-103105.tar.gz
n_training_jobs:
num_active_training_jobs:
type: integer
description: Number of actively running training processes
description: Number of running training processes
example: 2
401:
$ref: '#/components/responses/401NotAuthenticated'
Expand Down
2 changes: 1 addition & 1 deletion rasa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ async def status(request: Request):
{
"model_file": app.agent.model_directory,
"fingerprint": fingerprint_from_path(app.agent.model_directory),
"n_training_jobs": app.active_training_processes.value,
"num_active_training_jobs": app.active_training_processes.value,
}
)

Expand Down
8 changes: 6 additions & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ def train(results):
time.sleep(1)
_, status_resp = rasa_app.get("/status")
assert status_resp.status == 200
if status_resp.json["n_training_jobs"] == 1:
if status_resp.json["num_active_training_jobs"] == 1:
break
assert status_resp.json["n_training_jobs"] == 1
assert status_resp.json["num_active_training_jobs"] == 1

p1.join()
assert results["train_response_code"] == 200

_, status_resp = rasa_app.get("/status")
assert status_resp.status == 200
assert status_resp.json["num_active_training_jobs"] == 0


@pytest.mark.parametrize(
"response_test",
Expand Down

0 comments on commit c41144c

Please sign in to comment.