Skip to content

Commit

Permalink
fix DataRouter args in server
Browse files Browse the repository at this point in the history
  • Loading branch information
ricwo committed Sep 5, 2018
1 parent 20bef32 commit 74370bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions rasa_nlu/project.py
Expand Up @@ -284,8 +284,8 @@ def update_model_from_dir_and_unload_others(self,
model_name # type: Text
):
# unload all loaded models
for model_name in self._list_loaded_models():
self.unload(model_name)
for model in self._list_loaded_models():
self.unload(model)

self._begin_read()
status = False
Expand Down
16 changes: 9 additions & 7 deletions rasa_nlu/server.py
Expand Up @@ -428,13 +428,15 @@ def unload_model(self, request):

_endpoints = read_endpoints(cmdline_args.endpoints)

router = DataRouter(cmdline_args.path,
cmdline_args.max_training_processes,
cmdline_args.response_log,
cmdline_args.emulate,
cmdline_args.storage,
_endpoints.model,
cmdline_args.wait_time_between_pulls)
router = DataRouter(
cmdline_args.path,
cmdline_args.max_training_processes,
cmdline_args.response_log,
cmdline_args.emulate,
cmdline_args.storage,
model_server=_endpoints.model,
wait_time_between_pulls=cmdline_args.wait_time_between_pulls
)
if pre_load:
logger.debug('Preloading....')
if 'all' in pre_load:
Expand Down

0 comments on commit 74370bf

Please sign in to comment.