Skip to content

Fix inference bug when there are NULL in columns#175

Open
hjk1030 wants to merge 5 commits intoddkang:mainfrom
hjk1030:null_in_csv
Open

Fix inference bug when there are NULL in columns#175
hjk1030 wants to merge 5 commits intoddkang:mainfrom
hjk1030:null_in_csv

Conversation

@hjk1030
Copy link
Contributor

@hjk1030 hjk1030 commented Apr 15, 2024

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.

@ddkang
Copy link
Owner

ddkang commented Apr 15, 2024

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

@ttt-77
Copy link
Collaborator

ttt-77 commented Apr 16, 2024

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

@hjk1030
Copy link
Contributor Author

hjk1030 commented Apr 16, 2024

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?

@ttt-77
Copy link
Collaborator

ttt-77 commented Apr 16, 2024

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

group = group.drop(columns=name_to_input_cols[service_name]).dropna()

@continue-revolution
Copy link
Collaborator

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

@hjk1030
Copy link
Contributor Author

hjk1030 commented Apr 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants