MCPcopy
hub / github.com/RasaHQ/rasa / test_evaluate_stories_end_to_end

Function test_evaluate_stories_end_to_end

tests/test_server.py:665–694  ·  view source on GitHub ↗
(
    rasa_app: SanicASGITestClient, end_to_end_story_path: Text
)

Source from the content-addressed store, hash-verified

663
664
665async def test_evaluate_stories_end_to_end(
666 rasa_app: SanicASGITestClient, end_to_end_story_path: Text
667):
668 stories = rasa.shared.utils.io.read_file(end_to_end_story_path)
669
670 _, response = await rasa_app.post(
671 "/model/test/stories?e2e=true",
672 data=stories,
673 headers={"Content-type": rasa.server.YAML_CONTENT_TYPE},
674 )
675
676 assert response.status == HTTPStatus.OK
677 js = response.json
678 assert set(js.keys()) == {
679 "report",
680 "precision",
681 "f1",
682 "accuracy",
683 "actions",
684 "in_training_data_fraction",
685 "is_end_to_end_evaluation",
686 }
687 assert js["is_end_to_end_evaluation"]
688 assert js["actions"] != []
689 assert set(js["actions"][0].keys()) == {
690 "action",
691 "predicted",
692 "confidence",
693 "policy",
694 }
695
696
697async def test_add_message(rasa_app: SanicASGITestClient):

Callers

nothing calls this directly

Calls 1

keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…