Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive Learning with user-friendly interface #2025

Closed
luisdemarchi opened this Issue Apr 4, 2018 · 19 comments

Comments

Projects
None yet
9 participants
@luisdemarchi
Copy link

luisdemarchi commented Apr 4, 2018

Rasa Core version: 0.8.5

Python version: 3.6

Operating system: osx

Issue:
How can I "carry" interactive console learning to an HTTP / rest? The idea is to make a friendly front end for key people to do the training.

@tmbo

This comment has been minimized.

Copy link
Member

tmbo commented Apr 9, 2018

very good point. in #301 we are working on a larger refactoring of the training data generation and connected to that the way the online learning works. I think this is something we can takle afterwards.

@tdzienniak

This comment has been minimized.

Copy link
Contributor

tdzienniak commented Aug 28, 2018

Hi, what is the status of this issue? Is there any work being done to allow creaction of custom UIs for interactive trainng?

@tmbo

This comment has been minimized.

Copy link
Member

tmbo commented Aug 28, 2018

We did just merge a large refactoring of the APIs & online learning. The online learning script that is using the commandline as a UI is now just using the servers HTTP api to communicate with the model. That means that it should be straight forward to now create a webfrontend instead: https://github.com/RasaHQ/rasa_core/blob/master/rasa_core/training/online.py#L323 this is the loop the cmd online learning is running, most of the code in that file is printing stuff to the commandline or sending requests to the rasa core HTTP server.

@jonDel

This comment has been minimized.

Copy link

jonDel commented Aug 31, 2018

Any minimal documentation or a simple example on how to run an access the interactive learning server via http requests?

@tdzienniak

This comment has been minimized.

Copy link
Contributor

tdzienniak commented Sep 2, 2018

@jonDel example is in the file pointed by @tmbo: https://github.com/RasaHQ/rasa_core/blob/master/rasa_core/training/online.py

I think it's quite simple and straightforward.

@jonDel

This comment has been minimized.

Copy link

jonDel commented Sep 2, 2018

That's clearly not an example. That's the implementation itself. I expected something like this: https://rasa.com/docs/core/server/ , where there are simple and straightforward instructions on how to serve and how to access the http server.

@tdzienniak

This comment has been minimized.

Copy link
Contributor

tdzienniak commented Sep 3, 2018

Why downvote me? This is an example of use of this new API, it is not and implementaion of that API. You can wait for "proper" example and docs maybe for months or read that code and write interactive learning toos with web UI today. It's your choice.

@tmbo

This comment has been minimized.

Copy link
Member

tmbo commented Sep 3, 2018

@jonDel - there is no "interactive learning server". There are a couple endpoints on the server that allow you to build a interactive learning UI by using them, but it is not a separate server. This is why the online.py is a good starting point, as it shows you how to use these endpoints to create the interactive learning experience. These are the endpoints you need:

  • POST /conversations/SENDER_ID/messages to send text messages to a tracker, logging them there
  • GET /conversations/SENDER_ID/predict to get the prediction of the next action given the current state of the dialogue tracker (BUT not actually running the action, just predicting it)
  • /domain to get information about the currently loaded domain, e.g. which slots are available
  • POST /conversations/SENDER_ID/execute to run an action (core will run the action, collect events from that action and update the tracker)
  • PUT /conversations/SENDER_ID/tracker/events to replace all events on the tracker (e.g. if a wrong intent was predicted, you want to correct the list of events and push the whole list)
  • POST /finetune to tell the model to train on the additional training samples
@jonDel

This comment has been minimized.

Copy link

jonDel commented Sep 3, 2018

I was expecting something different because of the comments on https://github.com/RasaHQ/rasa_core/issues/867
"It is run as an http server now, please take a look at this issue: #343"
And @tdzienniak , I downvoted you because you just repeated what tmbo previously said, which didn't bring any contribution to solve the question asked. For me, #867 was quite misleading, since it made me think a separated http server would be available in version 0.11. Now is clear that is not the case.

@akelad

This comment has been minimized.

Copy link
Collaborator

akelad commented Sep 3, 2018

I just meant with that comment that it's done via http now, which it was not previously

@santteegt

This comment has been minimized.

Copy link

santteegt commented Sep 3, 2018

in there any plans to provide a web interface under the same project ?

@crownpku

This comment has been minimized.

Copy link
Contributor

crownpku commented Sep 11, 2018

Rasa UI seems promising. It already gives a good UI for Rasa NLU. It would be a natural extension for it to support Rasa Core and its interactive learning to complete the whole chatbot building pipeline.

@akelad

This comment has been minimized.

Copy link
Collaborator

akelad commented Sep 11, 2018

Rasa UI isn't maintained by us so i can't say whether it'll have that in the future :)
Something we are currently working on is making the command line interface more usable

@tdzienniak

This comment has been minimized.

Copy link
Contributor

tdzienniak commented Sep 11, 2018

I'm currently creating Web interface for interactive learning. For now I can't share any code, but I can tell, that it is very easy to use this new API and I have working tool after 2 days of work. :)

@crownpku

This comment has been minimized.

Copy link
Contributor

crownpku commented Sep 11, 2018

Yeah. I'm just imaging that with all this excellent work Rasa has done in the backend, a nice front-end UI would attract much more users to use it for building bots for the full pipeline painlessly without any coding :)

@Husamx

This comment has been minimized.

Copy link

Husamx commented Sep 13, 2018

I'm currently creating Web interface for interactive learning. For now I can't share any code, but I can tell, that it is very easy to use this new API and I have working tool after 2 days of work. :)

Can you share with us how you used the API? not your code, but just the API calls

@tdzienniak

This comment has been minimized.

Copy link
Contributor

tdzienniak commented Sep 22, 2018

There is not much to share, I use API endpoints just like in online.py file. The flow is almost the same, just adapted to different IO interface (React app).

@pradeepmvn

This comment has been minimized.

Copy link
Contributor

pradeepmvn commented Oct 2, 2018

Just another mention. Its now called as interactive.py instead of online.py (above link)

https://github.com/RasaHQ/rasa_core/blob/master/rasa_core/training/interactive.py

@tmbo

This comment has been minimized.

Copy link
Member

tmbo commented Oct 2, 2018

Documentation of the http interactive learning api is done as well https://rasa.com/docs/core/master/server/#operation/executeAction

@tmbo tmbo transferred this issue from RasaHQ/rasa_core Mar 21, 2019

@akelad akelad closed this Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.