8000 Refactor intent service by forslund · Pull Request #2599 · MycroftAI/mycroft-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 8, 2024. It is now read-only.

Refactor intent service #2599

Merged
merged 13 commits into from
Sep 23, 2020
Merged

Conversation

forslund
Copy link
Collaborator
@forslund forslund commented May 29, 2020

Description

The intent handling has been spread out over a bunch of files and this sort of collects it back into a single location makes the entire flow viewable from a single handler for the old recognizer_loop:utterance message.

The resolution order is the same as before only expressed as a single list instead of a series of checks and fallbacks interlaced.

  • Converse
  • Padatious High Confidence
  • Adapt
  • Fallback High priority
  • Padatious Medium Confidence
  • Fallback Medium priority
  • Padatious Last ditch effort
  • Fallback Low priority

This collects the many parts of where intent is handled into a single
location handling the entire flow.

The idea is that, in the end, all the skill calling should be done from
this method. The main intent parsers does this but the converse and
fallback still calls directly.

Future work: Converse and fallback still triggers handlers directly.

How to test

Best way to test this is to make sure the voight kampff tests are still passing.

Contributor license agreement signed?

CLA [ Yes ]

@forslund forslund added the Status: Work in progress PR being actively worked on, not yet ready for review. label May 29, 2020
@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label May 29, 2020
@forslund forslund force-pushed the refactor/intent-service branch from 6c6a61c to acf750b Compare May 29, 2020 17:28
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

1 similar comment
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@forslund forslund force-pushed the refactor/intent-service branch from acf750b to e4e1415 Compare May 29, 2020 19:33
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund forslund removed the Status: Work in progress PR being actively worked on, not yet ready for review. label Jul 6, 2020
@forslund forslund force-pushed the refactor/intent-service branch from e4e1415 to 6e2c9f8 Compare July 10, 2020 06:29
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@krisgesling krisgesling self-requested a review July 13, 2020 01:50
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@forslund forslund force-pushed the refactor/intent-service branch from 6e2c9f8 to 1a91a32 Compare July 29, 2020 07:07
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@forslund forslund force-pushed the refactor/intent-service branch from 1a91a32 to b593fb3 Compare July 29, 2020 11:32
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

1 similar comment
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

Copy link
Contributor
@krisgesling krisgesling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall loving this refactor! Great to see the intent services extracted and the new flow of looping through each matching function is far more straight forward.

@forslund
Copy link
Collaborator Author

Good catches all over. Will update the PR during the day

@forslund forslund force-pushed the refactor/intent-service branch from b593fb3 to ecaa3ae Compare August 10, 2020 19:23
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund forslund force-pushed the refactor/intent-service branch 2 times, most recently from a4f4d18 to d84956b Compare August 11, 2020 05:26
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund
Copy link
Collaborator Author

Valid point, will update

@forslund
Copy link
Collaborator Author

Question which rule-set are we aming to conform to?

If no range is provided it defaults to 0-100 to be backwards compatible
Simplify the handle_utterance into a list of intent matching functions
run in order until a match is found.

The resolution order is

- Converse
- Padatious High Confidence
- Adapt
- Fallback High priority
- Padatious Medium Confidence
- Fallback Medium priority
- Padatious Last ditch effore
- Fallback Low priority

This collects the many parts of where intent is handled into a single
location handling the entire flow.

The idea is that, in the end, all the skill calling should be done from
this method. The main intent parsers does this but the converse and
fallback still calls directly.
This issue was properly fixed in Adapt 0.3.5.
@forslund forslund force-pushed the refactor/intent-service branch from 5d3a296 to 336dd70 Compare August 13, 2020 06:38
- Move setting original utterance to the respective intent service
- Remove botch limiting the intent service to a single STT hypothesis
- imports
- All docstring
- AdaptService method warnings
- Add missing docstrings
- fix short variable names
- restructure return code
@forslund forslund force-pushed the refactor/intent-service branch from 336dd70 to 8089411 Compare August 13, 2020 07:28
@devops-mycroft
Copy link

Voight Kampff Integration Test Failed (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@forslund forslund force-pushed the refactor/intent-service branch from 54380d1 to 8a8caa5 Compare August 20, 2020 12:39
@devops-mycroft
Copy link

Voight Kampff Integration Test Succeeded (Results)

@krisgesling
Copy link
Contributor

Thanks again for this huge clean up Ake, it's fantastic work!

I'm going to leave the commits unsquashed as they each represent a significant change and are already well structured.

@krisgesling krisgesling merged commit ae72ebd into MycroftAI:dev Sep 23, 2020
@forslund forslund removed the Status: Work in progress PR being actively worked on, not yet ready for review. label Sep 23, 2020
@JarbasAl JarbasAl mentioned this pull request Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0