gchers / fbleau

A tool for estimating a system's information leakage via Machine Learning
MIT License
10 stars 2 forks source link

Equality check in KNN fails #7

Closed bogdan-kulynych closed 4 years ago

bogdan-kulynych commented 4 years ago

It seems that the equality check in knn.rs should be made approximate:

thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `Some(0.0000000000000004440892098500626)`,
 right: `Some(0.0000000000000002220446049250313)`', src/estimates/knn.rs:390:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
fatal runtime error: failed to initiate panic, error 5
gchers commented 4 years ago

Hey @bogdan-kulynych , could you give me a train/test files that replicate the error?

(Trying to figure out if this only happens when called from the Python module, as it'd seem to appear, or not.)

gchers commented 4 years ago

Branch #fix-assertion was solving this temporarily. However, since we cannot reproduce the error I'll close this for now. If it happens again, we'll open a new Issue.