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

Bugfix - tests failing on slow responses #46

Merged
merged 3 commits into from
Aug 13, 2020
Merged

Conversation

krisgesling
Copy link
Contributor

A number of tests are currently failing for the Wiki Skill, caused by the delay in responding exceeding the default 10 second Voight Kampff Step timeout.

This adds a custom wait while speaking step to delay the start of the final mycroft reply should contain step for each test. An additional 3 second sleep was added to this to ensure some delay occured given the Docker runs use a dummy TTS and hence wouldn't pause.

This is intended to get the VK tests passing in the short term. More thought needs to go into the best way to handle this going forward to make the test suite more robust.

We also need to investigate ways to speed up the response time from the wikipedia service. A user shouldn't need to wait > 10 seconds for an answer. Options are to switch libraries or reduce the search calls. Currently for a single search we can make up to 3 requests to wikipedia as we:

  1. List possible pages
  2. Fetch two line summary of most likely page.
  3. If too long, re-fetch one line summary

@forslund
Copy link
Collaborator

forslund commented Aug 13, 2020

As I recall it step 3 was added since the method used to cut down the number of lines produced bad results

I quick couple of tests using "George Washington":

Search step takes ~0.8 seconds

Summary retrieval options

  • 2 Summary requests in series: 2.65 sec
  • 2 Summary requests in parallel using concurrent.futures.ThreadPoolExecutor: 1.8 seconds
  • 1 Summary request and cutting out the first sentence: 1.6 seconds

I also did an experiment with 2 sequential summary calls using "hyper" for http2 usage getting the time down to ~1.2 seconds (this could be a couple of factors since I had to do some edits to the wikipedia module code)

@forslund
Copy link
Collaborator

Also tested and working well. (though the speed of the wiki calls are much higher now than before today so there is no issue for me)

@krisgesling krisgesling merged commit 12d5833 into 20.02 Aug 13, 2020
@krisgesling krisgesling deleted the bugfix/failing-vk-tests branch October 5, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants