Interactive training

Is there any way to swap the DEFAULT_SERVER_PORT value for interactive training? I have a production instance running on a machine and I’d like to also run interactive training for dev on the same machine. At the moment they overlap on the 5005 port.

Any suggestions?

Hey,

I can set the port using handle_channels method. Its default is set to 5005.

May I asked how you serve your bot in production? I am thinking about the setup at the moment and wonder how to serve one bot to several users simoultanously. Would be great to discuss the infrastructure.

Cheers

Sorry, could you show me an example? handle_channels returns a http server, what should I do with that?

My production isn’t very production-like yet…but I’ve set up docker instances of a few components:

  • Core
  • NLU
  • NLG
  • Actions
  • Redis (for trackerstore)

Then load them all using docker-compose and expose only the 5005 port. The core also is connected to a few channels.

You cannot change the port for Core run instance with --port? if you are using rasa_core.run script?

No, I’m running this:

python -m rasa_core.train \
  --online -o models/dialogue \
  -d domain.yml -s stories.md \
  --endpoints endpoints.yml

Isn’t this the right way to start interactive training?

I mean the port for the run instance to free up 5005

yeah your train command is okay but at the moment there are no cmdline args to change the port for online training, however you can change the port for rasa_core.run that you are starting for running the chatbot

Yeah, I understand that. I was just hoping I could easily change the port for the training, rather than move my core and my channels.

You can open an issue , if the enhancement is accepted it can be changed

it is not that hard to change it, you can extend a cmdline args port in train.py then at train/interactive.py - add an arg for port that replaces the default one.

if you use your own python script- you can change it yourself but it needs to be changed at training/interactive.py

at the moment, default port is hardcoded