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

markers / validation #10012

Merged
merged 14 commits into from
Nov 2, 2021
Prev Previous commit
Swap over warnings for errors
  • Loading branch information
usc-m committed Nov 2, 2021
commit 730689a7e6a68b02546512fd150f608285ffac0b
12 changes: 6 additions & 6 deletions rasa/core/evaluation/marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
MarkerRegistry,
)
from rasa.shared.core.events import ActionExecuted, SlotSet, UserUttered, Event
import rasa.shared.utils.io
import logging

logger = logging.getLogger(__name__)


@MarkerRegistry.configurable_marker
Expand Down Expand Up @@ -158,7 +160,7 @@ def validate_against_domain(self, domain: Domain) -> bool:
valid = self.text in domain.action_names_or_texts

if not valid:
rasa.shared.utils.io.raise_warning(
logger.error(
f"Referenced action '{self.text}' does not exist in the domain"
)

Expand Down Expand Up @@ -196,7 +198,7 @@ def validate_against_domain(self, domain: Domain) -> bool:
valid = self.text in domain.intent_properties

if not valid:
rasa.shared.utils.io.raise_warning(
logger.error(
f"Referenced intent '{self.text}' does not exist in the domain"
)

Expand Down Expand Up @@ -235,9 +237,7 @@ def validate_against_domain(self, domain: Domain) -> bool:
valid = any(self.text == slot.name for slot in domain.slots)

if not valid:
rasa.shared.utils.io.raise_warning(
f"Referenced slot '{self.text}' does not exist in the domain"
)
logger.error(f"Referenced slot '{self.text}' does not exist in the domain")

return valid

Expand Down