aidb icon indicating copy to clipboard operation
aidb copied to clipboard

Fix inference bug when there are NULL in columns

Open hjk1030 opened this issue 1 year ago • 6 comments

The problem in issue #104 seems to be caused by having NaN in the dataframe, which is not possible to transformed into json. By replacing the NaN in the dataframe with empty string should fix the issue.

P.S. I cannot really reproduce the problem since the blank place in the given table are not really null, instead are wrongly recognized strings starts with character '='. However, after searching on stackoverflow I believe the fix should resolve the issue.

hjk1030 avatar Apr 15 '24 14:04 hjk1030

@ttt-77 how come the test case doesn't reflect the issue?

ddkang avatar Apr 15 '24 14:04 ddkang

I removed the rows containing NULL values for previous tests. Can you use the data file from the provided link to see if you can reproduce the error? To expedite the process, you can retain only a few normal rows and all abnormal rows initially. @hjk1030

https://drive.google.com/file/d/19lbMHnAPVs41iHlZXukRT6j2jUvJ7se8/view?usp=sharing

ttt-77 avatar Apr 16 '24 03:04 ttt-77

I still can't reproduce the same error. It seems that the program would abort at a type check before the request is sent(though the fix works for that). Could you provide the test script that the error happened?

hjk1030 avatar Apr 16 '24 16:04 hjk1030

It appears that JSON now allows 'None' values, so this is no longer an issue. However, rows containing 'None' values will be dropped. Could you check if we can remove '.dropna()' from the following code? @continue-revolution https://github.com/ddkang/aidb/blob/5bb44777ba1d5e77eda504eaff3662530f76f458/tests/inference_service_utils/http_inference_service_setup.py#L66

ttt-77 avatar Apr 16 '24 21:04 ttt-77

I think it's fine to remove "dropna()"

continue-revolution avatar Apr 24 '24 19:04 continue-revolution

I believe dropna is still needed as there are lines containing only null values corresponding to no outputs. I changed the parameters to dropping only these lines and it seems to pass the test for now.

hjk1030 avatar Apr 25 '24 15:04 hjk1030