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

'rasa.model.unpack_model ' Triggered 4 times and did not clean up when the program was closed. #5434

Closed
glacierck opened this issue Mar 18, 2020 · 7 comments
Labels
stale type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@glacierck
Copy link

glacierck commented Mar 18, 2020

Rasa version: 1.8

Rasa SDK version (if used & relevant):

Rasa X version (if used & relevant):

Python version:3.7.1

Operating system (windows, osx, ...):windows

Issue:
'rasa.model.unpack_model ' Triggered 4 times and did not clean up when the program was closed.
4 folders are generated in the directory 'CreatorTemp' after 'rasa shell -vv'.
Only the last two directories are deleted when the program exits.
After several starts, I got a lot of useless cache directories

Error (including full traceback):

PS E:\GitHub\bot\test_app> rasa shell -vv
2020-03-18 15:13:43 DEBUG    rasa.model  - Extracted model to 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmpvcevdagm'.
2020-03-18 15:13:43 DEBUG    rasa.cli.utils  - Parameter 'endpoints' not set. Using default location 'endpoints.yml' instead.
2020-03-18 15:13:43 DEBUG    rasa.cli.utils  - Parameter 'credentials' not set. Using default location 'credentials.yml' instead.
2020-03-18 15:13:43 DEBUG    rasa.model  - Extracted model to 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmph5zxtwp4'.
2020-03-18 15:13:44 INFO     root  - Connecting to channel 'cmdline' which was specified by the '--connector' argument. Any other channels will be i
gnored. To connect to all given channels, omit the '--connector' argument.
2020-03-18 15:13:44 DEBUG    sanic.root  - CORS: Configuring CORS with resources: {'/*': {'origins': [''], 'methods': 'DELETE, GET, HEAD, OPTIONS, P
ATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': None, 'supports_credentials': True, 'max_age': None, 'send_wildcard': False, 'automatic
_options': True, 'vary_header': True, 'resources': {'/*': {'origins': ''}}, 'intercept_exceptions': True, 'always_send': True}}
2020-03-18 15:13:44 DEBUG    rasa.core.utils  - Available web server routes:
/webhooks/rest                                     GET                            custom_webhook_CmdlineInput.health
/webhooks/rest/webhook                             POST                           custom_webhook_CmdlineInput.receive
/                                                  GET                            hello
2020-03-18 15:13:44 INFO     root  - Starting Sophi server on http://localhost:5005
2020-03-18 15:13:44 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2020-03-18 15:13:44 INFO     root  - Enabling coroutine debugging. Loop id 1291375342664.
2020-03-18 15:13:44 DEBUG    rasa.model  - Extracted model to 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmpep4di4kg'.
2020-03-18 15:13:44 INFO     rasa.nlu.isi.ISISemanticDependency  - load()...
...
2020-03-18 15:13:45 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2020-03-18 15:13:45 DEBUG    rasa.core.lock_store  - Connected to lock store 'InMemoryLockStore'.
2020-03-18 15:13:45 DEBUG    rasa.model  - Extracted model to 'C:\Users\Public\Documents\Wondershare\CreatorTemp\tmpnujnm5cy'.
2020-03-18 15:13:45 DEBUG    pykwalify.compat  - Using yaml library: f:\virtualenvs\rasa-wr2c3hgm-py3.7\lib\site-packages\ruamel\yaml\__init__.py
2020-03-18 15:13:45 DEBUG    rasa.core.nlg.generator  - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
Bot loaded. Type a message and press enter (use '/stop' to exit): 
Your input ->                                                                                                                                      

Cancelled by user

2020-03-18 15:15:33 INFO     root  - Killing Sanic server now.

Command or request that led to error:

rasa shell -vv
ctrl + c

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

@glacierck glacierck added the type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. label Mar 18, 2020
@sara-tagger
Copy link
Collaborator

Thanks for the issue, @erohmensing will get back to you about it soon!

You may find help in the docs and the forum, too 🤗

@glacierck
Copy link
Author

glacierck commented Mar 19, 2020

I've fixed the bug about the undeleted temporary files.
But I still don't understand why rasa has to decompress it many times.When I execute 'rasa shell'.
First decompression :

 rasa.cli.shell.shell

Second decompression

 rasa.cli.run.run

I think these two places are more about checking the validity of the model structure than using it.
I modified them according to this idea

@erohmensing
Copy link
Contributor

Sorry, I'm confused. With I've fixed the bug and I modified them according to this idea, where are you fixing things? Was it an issue with the code or your setup?

@glacierck
Copy link
Author

glacierck commented Mar 30, 2020

The main causes of useless cache directories are code issues.
Here's my solution, It solves the problem of useless cache but not the problem of useless decompression behavior. Show sadness for my hard disk.
image
image
image

@federicotdn
Copy link
Contributor

Hey @glacierck! Would you mind opening a PR with your proposed changes? That way we can review and test them easily.

@stale
Copy link

stale bot commented Jul 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 2, 2020
@stale
Copy link

stale bot commented Jul 10, 2020

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.

@stale stale bot closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

4 participants