We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9de64c9 commit 9707f4dCopy full SHA for 9707f4d
eppo_metrics_sync/validation.py
@@ -94,9 +94,9 @@ def valid_guardrail_cutoff_signs(payload):
94
facts[fact['name']] = fact
95
96
for m in payload.metrics:
97
- numerator_fact = facts[m['numerator']['fact_name']]
98
- if is_guardrail_cutoff_exist(m) and 'desired_change' in numerator_fact:
99
- error = is_valid_guardrail_cutoff_sign(m, numerator_fact)
+ numerator_fact_name = m['numerator']['fact_name']
+ if is_guardrail_cutoff_exist(m) and numerator_fact_name in facts and 'desired_change' in facts[numerator_fact_name]:
+ error = is_valid_guardrail_cutoff_sign(m, facts[numerator_fact_name])
100
if error:
101
payload.validation_errors.append(
102
f"{m['name']} is having invalid guardrail_cutoff sign: {error}"
0 commit comments