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
Non-deterministic behavior in featurization #412
Comments
I'm working on #439 and currently the tests fail https://github.com/HazyResearch/fonduer/pull/439/checks?check_run_id=759815347 at assertions on the number of feature keys like below.
It seems to be reproducible as the same commit fails on my forked repo too (https://github.com/HiromuHota/fonduer/runs/759811429?check_suite_focus=true). |
One more thing: the same GitHub Actions run (https://github.com/HazyResearch/fonduer/pull/439/checks?check_run_id=759815303), but a different error on mac (3.6)
Two differences:
|
By looking at two runs (https://github.com/HazyResearch/fonduer/actions/runs/131557275 and https://github.com/HiromuHota/fonduer/actions/runs/131556294), the three types of errors happened as below:
|
Regarding the 1A type of error, |
The number of contituent mentions of def temp_throttler(c):
(part, attr) = c
if same_table((part, attr)):
return is_horz_aligned((part, attr)) or is_vert_aligned((part, attr))
return True The difference comes either from |
A few updates:
Case 1 (the test assertion assumes the following result from VisualLinker)
Case 2 (this happens sometimes, not sure what make this happen)
|
One update: the non-deterministic behaviour of I think the following relationship should have fonduer/src/fonduer/parser/models/sentence.py Lines 248 to 252 in 246a92d
Findings that lead me to the above statement:
|
A few more updates:
|
Describe the bug
When working with large (~7k docs) corpus of hardware datasheets, extracting multiple relations, we expect that the features for each candidate would be deterministic between each run. Even more so if we have
parallelism=1
set in the Featurizer. However, we find that there can be small (e.g., < 5) differences between feature tables, resulting in slightly different sparse matrices, and thus, slightly different results.To Reproduce
Running on the HACK transistor dataset will reproduce the error. However, it will take a long time, and we haven't been able to get a very minimal example that reproduces the error yet. Attached are two feature table dumps between two different runs with
parallelism=1
. Note that there is only a single difference on line65454
.feature_table.tar.gz
Note that it isn't always one difference, and the difference is not deterministic. The different attached is just an example.
Expected behavior
We would expect that these feature tables are identical between runs.
Error Logs/Screenshots
For convenience, here is the differing line in screenshot form
Additional context
If the issue is in the UDF implementation, this might affect the Labeler in addition to the Featurizer, since they share a lot of the UDF code.
The text was updated successfully, but these errors were encountered: