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

KolmogorovSmirnov2Sample: Conditions are ignored #42

Closed
kklein opened this issue Jul 28, 2022 · 0 comments · Fixed by #44
Closed

KolmogorovSmirnov2Sample: Conditions are ignored #42

kklein opened this issue Jul 28, 2022 · 0 comments · Fixed by #44
Labels
bug Something isn't working

Comments

@kklein
Copy link
Collaborator

kklein commented Jul 28, 2022

The KolmogorovSmirnov2Sample constraint can be initialized with DataReferences containing Conditions. This is apparent by the parameters in add_ks_2sample_constraint:

https://github.com/Quantco/datajudge/blob/main/src/datajudge/requirements.py#L1276-L1277

Yet, since get_ks_2sample in db_access operates on DataSource objects - instead of DataReference objects - the Conditions attached to DataReferences are ignored.

While a Condition was indeed used in one integration test, it was used for both DataReferences at the same time. Since the same test also succeeds without a Condition it did not became apparent that Conditions are ignored:

https://github.com/Quantco/datajudge/blob/main/tests/integration/test_integration.py#L1768-L1789

Resolving this issue is one of the many things we should obtain for free when tackling #29 and only ever accessing the underlying data via DataReference.get_selection - which takes care of these things under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant