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 X startup delay #3611

Closed
psds01 opened this issue May 27, 2019 · 6 comments
Closed

Rasa X startup delay #3611

psds01 opened this issue May 27, 2019 · 6 comments
Assignees
Labels
area:rasa-x/backend 🎩 All issues focused on the Rasa X backend type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@psds01
Copy link
Contributor

psds01 commented May 27, 2019

Rasa version: 1.0.1

Python version: Python 3.6.8 |Anaconda

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

Issue:

n_stories = 3 (stories.md)
n_intents ~= thousand (nlu.md)

plus some regex features

With rasa train, it takes only 40 seconds to train both nlu and core and the resulting model size is 12 MB. But when I run rasa x, it takes more than 2 minutes to load the UI. As this is happening, a file named rasa.db-journal gets created and deleted at least a hundred times.
sizes:

rasa.db = 1.6 MB
tracker.db = 1.6kB
model.tar.gz = 12.1 MB

Content of configuration file (config.yml):

# Configuration for Rasa NLU.
# https://rasa.com/docs/rasa/nlu/components/
language: en
pipeline: supervised_embeddings
  - epochs : 10

# Configuration for Rasa Core.
# https://rasa.com/docs/rasa/core/policies/
policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
    epochs : 1000
  - name: MappingPolicy

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

actions:
 - action_bot_do_0
 - action_bot_do_1
 - action_bot_do_2
 - action_bot_do_3
 - action_bot_do_4
 - action_bot_do_5
 - action_bot_do_6
 - action_bot_do_7
 - action_bot_do_8
 - action_bot_do_9
 - action_bot_do_10
 - action_bot_do_11
 - action_bot_do_12
 - action_bot_do_13
 - action_bot_do_14
 - action_bot_do_15
 - action_bot_do_16
 - action_bot_do_17
 - action_bot_do_18
 - action_bot_do_19
 - action_bot_do_20
 - action_bot_do_21
 - action_bot_do_22
 - action_bot_do_23
 - action_bot_do_24
 - action_bot_do_25
 - action_bot_do_26
 - action_bot_do_27
 - action_bot_do_28
 - action_bot_do_29
 - action_bot_do_30
 - action_bot_do_31
 - action_bot_do_32
 - action_bot_do_33
 - action_bot_do_34
 - action_bot_do_35

slots:
  is_a:
    type: categorical
    values:
      - true
      - false
  is_b:
    type: categorical
    values:
      - true
      - false
  is_c:
    type: categorical
    values:
      - true
      - false
  is_d:
    type: categorical
    values:
      - true
      - false
  is_e:
    type: categorical
    values:
      - true
      - false
  is_f:
    type: categorical
    values:
      - true
      - false
  g:
    type : text
  h:
    type : text
  i:
    type : text
  j:
    type : text
  k:
    type : text
  l:
    type : text
  m:
    type : text
  n:
    type: text
  o:
    type: text

entities:
- is_a
 - is_b
 - is_c
 - is_d
 - is_e
 - is_f
 - g
 - h
 - i
 - j
 - k
 - l
 - m
 - n
 - o

intents:
 - intent_a
 - intent_b
 - intent_c
 - intent_d
 - intent_e
 - intent_f
 - intent_g
 - intent_h
 - intent_i
 - intent_j
 - intent_k
 - intent_l
 - intent_m
 - intent_n
 - intent_o
 - intent_p

It may be due to rasa.db-journal getting created and deleted a lot of times but I am not exactly sure what's causing that. Any ideas why this might be happening?
Thanks,

@tmbo tmbo added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-x/backend 🎩 All issues focused on the Rasa X backend labels May 27, 2019
@tmbo
Copy link
Member

tmbo commented May 27, 2019

@wochinge is the issue maybe related to us SQL committing to often?

@wochinge
Copy link
Contributor

Yeah, that and maybe the amount of data which is read from file and injected in the database. Maybe it's possible to turn of synchronous commiting for sqlite

@akelad
Copy link
Contributor

akelad commented May 28, 2019

@psds01 thanks for spotting this -- we're looking into fixing this.

In the meantime, would you be willing to give us some feedback about your experience with Rasa X so far via this form?

@psds01
Copy link
Contributor Author

psds01 commented May 28, 2019

You are welcome.

Done @akelad. I love Rasa!

@ricwo ricwo closed this as completed Jun 16, 2019
@psds01
Copy link
Contributor Author

psds01 commented Jun 17, 2019

@ricwo Can you please mention the PR?
Also, if you could lmk the file the code you changed, it will be helpful. For "diff" analysis.

@ricwo
Copy link
Contributor

ricwo commented Jun 17, 2019

@psds01 I won't be able to share the diff or PR unfortunately, as rasa x is not maintained as a public repo. The change was related to the frequency of SQL commits.

We'll be releasing a new patch this evening (0.19.2) which improves the data injection speed further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-x/backend 🎩 All issues focused on the Rasa X backend 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