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

Add model name to the logs in CLI #6571

Closed
Akhil-YS opened this issue Sep 4, 2020 · 12 comments
Closed

Add model name to the logs in CLI #6571

Akhil-YS opened this issue Sep 4, 2020 · 12 comments
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework difficulty:easy 🦋 type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@Akhil-YS
Copy link

Akhil-YS commented Sep 4, 2020

Description of Problem:
It would be more informative if the name of the model which is currently being loaded is displayed in the logs for CLI commands like
rasa shell
rasa shell nlu
rasa run

Overview of the Solution:

(tensorflow) PS O:\Office\Chatbot\HealthCareChatbot\Chatbot\latest_vtest> rasa shell nlu --debug
2020-09-04 10:31:54 DEBUG    rasa.model  - Extracted the model {- MODEL_NAME } to 'C:\Users\Akhilesh\AppData\Local\Temp\tmpkpg3apm3'.
2020-09-04 10:32:25 INFO     rasa.nlu.components  - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2020-09-04 10:32:25 DEBUG    rasa.utils.tensorflow.models  - Loading the model {- MODEL_NAME }...
2020-09-04 10:32:42 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2020-09-04 10:32:42 DEBUG    rasa.utils.tensorflow.models  - Building tensorflow prediction graph...
2020-09-04 10:32:49 DEBUG    rasa.utils.tensorflow.models  - Finished building tensorflow prediction graph.
2020-09-04 10:33:05 INFO     rasa.nlu.components  - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en_core_web_md'.
NLU model loaded. Type a message and press enter to parse it.
Next message:
@Akhil-YS Akhil-YS added area:rasa-oss 🎡 Anything related to the open source Rasa framework type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR labels Sep 4, 2020
@sara-tagger
Copy link
Collaborator

Thanks for submitting this feature request 🚀 @tabergma will get back to you about it soon! ✨

@tabergma
Copy link
Contributor

tabergma commented Sep 4, 2020

@Akhil-YS Thanks for creating this issue. Should the model name only be visible during debug mode or in general? Do you think we need the full path or does the relative path is sufficient?

If you like you can also take this over and try to solve it. Would you be interested?

@Akhil-YS
Copy link
Author

Akhil-YS commented Sep 4, 2020

Hi, @tabergma I think the general mode would be good unless someone feels too many logs. As we would be running those commands from inside of the project path, I feel that the relative path would suffice.

Thank you for the invite. I would like to but currently, I'm occupied with other works too. I'll let u know if I could find some time.

@tabergma
Copy link
Contributor

tabergma commented Sep 4, 2020

Ok. Thanks for the input.

I think we can solve this by modifying this method: https://github.com/RasaHQ/rasa/blob/master/rasa/model.py#L121
I will add this issue to the contributor board. Feel free to pick it up if you have time. Thanks!

@Akhil-YS
Copy link
Author

Akhil-YS commented Sep 4, 2020

@tabergma. I will surely work on it as soon as I find the time. Thank you for the pointer.

Could you help me out with another issue regarding oov token in CountVectorsFeaturizer? I think the CountVectorsFeaturizer is not working with oov token. I posted it on the community forum and tagged u. I'm thinking to raise an issue here.

@lucasdutraf
Copy link
Contributor

Hey there, @tabergma ! Is someone working on this issue?
I'm new to Rasa community and code contribution, so I think this issue could be a nice start for me! Can I work on this?

@tabergma
Copy link
Contributor

@lucasdutraf Sure, feel free to pick it up 🚀

@lucasdutraf
Copy link
Contributor

@lucasdutraf Sure, feel free to pick it up

Amazing! I'm already working on it

@lucasdutraf
Copy link
Contributor

Hey @tabergma ! @mbslet and I are working together and we've got some progress, but also some questions about this issue.

First, we wanted to know if the expected output is something like that, to assure that we are on the right path for solving this issue:

(venv)  ~/Documentos/unb/gces/fork/teste  rasa shell nlu --debug                 
2020-09-23 21:21:04 DEBUG    rasa.model  - Extracted model models/name_test.tar.gz to '/tmp/tmpmyfor8ie'.
2020-09-23 21:21:04 DEBUG    rasa.telemetry  - Skipping request to external service: telemetry key not set.

Second, we didn't understand if all the mentioned commands like rasa shell , rasa shell nlu and rasa run should have the model relative path. And if it is, the message should be equal to the debug mode log like the example above?

@tabergma
Copy link
Contributor

As far as I understood the request of @Akhil-YS the model path should appear in all kind of commands and not only in debug mode but in also if you run, for example, rasa shell without the --debug flag.
Regarding the expected output, I would log something like Loading model <relative model path>....
As mentioned above I think you should be able to add a log statement in this line to solve the issue, but needs to be checked.

@lucasdutraf
Copy link
Contributor

Hey @tabergma !
We've opened a pull request for this issue at #6840 . Please let us know if you see anything that we can improve! 😄

@wochinge
Copy link
Contributor

closed by #6840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework difficulty:easy 🦋 type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

No branches or pull requests

5 participants