-
Notifications
You must be signed in to change notification settings - Fork 608
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
Hardcoding of threshold values for data tests #1352
Comments
Hi @AlexJonesNLP, the hardcoded values are only the "sensible defaults". If you do not pass your own test condition, this default will apply and will be derived from reference. You can set custom test conditions using parameters like Check the docs here: https://docs.evidentlyai.com/user-guide/tests-and-reports/run-tests#id-3.-set-test-conditions |
Here is a usage example using parameters tests = TestSuite(
tests=[
TestShareOfMissingValues(lte=0.05),
TestNumberOfConstantColumns(eq=0),
TestNumberOfEmptyRows(eq=0),
TestNumberOfEmptyColumns(eq=0),
TestNumberOfDuplicatedColumns(eq=0),
generate_column_tests(
TestColumnDrift,
columns="all",
parameters={"stattest_threshold": 0.3, "stattest": "psi", "is_critical": False}
),
TestShareOfDriftedColumns(lte=0.3),
]
) |
@elenasamuylova Ahh I see thank you, looking at these lines I get it now: evidently/src/evidently/tests/base_test.py Lines 407 to 413 in 15bfe24
I'm still not quite sure why this implementation was chosen over using optional parameters though? |
Hello, I was wondering about setting custom thresholds for data tests and I was a bit surprised that there didn't seem to be a straightforward way to do it for many of the tests. Some threshold values appear to be hardcoded, e.g. here:
https://github.com/evidentlyai/evidently/blob/d3e21fb657118f82e5e388223347e57e313c800e/src/evidently/tests/data_integrity_tests.py#L126C75-L126C87
I'm aware that there's a way to make custom drift methods (https://docs.evidentlyai.com/user-guide/customization/options-for-statistical-tests), but it seems very bizarre to me that these thresholds are hardcoded in certain tests rather than simply being optional parameters. Am I missing something here? Why aren't these thresholds always passed as optional parameters?
The text was updated successfully, but these errors were encountered: