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

Get rid of model access in rasa.core.test #9135

Closed
1 task done
wochinge opened this issue Jul 15, 2021 · 0 comments · Fixed by #9173
Closed
1 task done

Get rid of model access in rasa.core.test #9135

wochinge opened this issue Jul 15, 2021 · 0 comments · Fixed by #9173
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. feature:rasa-3.0/architecture type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@wochinge
Copy link
Contributor

wochinge commented Jul 15, 2021

Description of Problem:
The rasa.core.test module has several paths where it directly access attributes on the Agent or even lower. This has the disadvantage that the test code is really tied to the specific model architecture. With the revamp we want to reduce these ties. This will help us to keep the interface of Graphprocessor small and explicit and will reduce the amount of breaking things when we start to implement the actual graph.

Related implementation proposal page

Currently the following pieces in the code directly access Agent stuff which we don't want it to access

  1. Tokenizing messages for the entity evaluation: We can skip this case for now ⚠️ We handle it once we have handled the prediction metadata task which adds the token to the output of every parsed user message.
  2. Determining whether we should predict another action: My idea was to change this check to raise an exception ActionLimitReached when we call processor.predict_next_action instead of having a separate method which requires callers to know the logic
  3. 2nd part of determining whether predict another action: Same we can handle this with an exception as well in the test module

Overview of the Solution:
I outlined some proposed ways of getting rid of these accesses. Anything else which doesn't require an additional method on the GraphProcessor is also fine.

Definition of Done:

  • The described locations 2) and 3) no longer replicate logic from the processor
@wochinge wochinge added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR area:rasa-oss 🎡 Anything related to the open source Rasa framework area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) feature:rasa-3.0/architecture-prototype feature:rasa-3.0/architecture effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. and removed feature:rasa-3.0/architecture-prototype labels Jul 15, 2021
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 area:rasa-oss/model-testing Issues focused around testing models (e.g. via `rasa test`) effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. feature:rasa-3.0/architecture type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants