You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the data features, while passing through each feature, I found a null value for number_missing_values. The following code can replicate the problem:
Hi @ArlindKadra the getNumberOfMissingValues() could return null when the OpenML API returns empty XML elements like <oml:NumberOfMissingValues />. The problem occurred because: XStream XML parsing library had no converter for empty Integer elements, only for empty Double elements via EmptyDoubleConverter
I propose a fix with the following solution:
Create EmptyIntegerConverter.java in apiconnector/src/main/java/org/openml/apiconnector/xstream:
Activity
rohansen856 commentedon Nov 16, 2025
Hi @ArlindKadra the
getNumberOfMissingValues()could return null when the OpenML API returns empty XML elements like <oml:NumberOfMissingValues />. The problem occurred because:XStream XML parsing library had no converter for empty Integer elements, only for empty Double elements via EmptyDoubleConverterI propose a fix with the following solution:
EmptyIntegerConverter.javainapiconnector/src/main/java/org/openml/apiconnector/xstream:XstreamXmlMapping.java(line 105-106):These changes ensure that:
The fix ensures backward compatibility while resolving the null pointer issue.
I would like to raise a PR with the approach to solve this issue. Thannks!