Aarhus-Psychiatry-Research / timeseriesflattener

Converting irregularly spaced time series, such as eletronic health records, into dataframes for tabular classification.
https://Aarhus-Psychiatry-Research.github.io/timeseriesflattener
MIT License
18 stars 2 forks source link

fix: don't mix types in HasValuesAggregator fallback #570

Closed HLasse closed 3 months ago

HLasse commented 3 months ago

Since the output of HasValuesAggregator is of type bool, newer versions of polars error when using np.nan as fallback, as np.nan is a float, and polars can't find a suitable type for the Series.

This is a temporary fix that changes the fallback used in the test for HasValuesAggregator to False. Going forward, Ia propose we change the output to 0/1 instead of bools, as 2) they have the same semantic meaning, 1) they have to be transformed to ints anyways before modelling, and 3) it will allow us to still use np.nan as fallback. Added in issue for this in #569

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #570 will not alter performance

Comparing fix-failing-tests (6e403d5) with main (3d662f8)

Summary

✅ 7 untouched benchmarks

github-actions[bot] commented 3 months ago

This PR is stale because it has been open 1+ days with no activity. Feel free to either 1) remove the stale label or 2) comment. If nothing happens, this will be closed in 7 days.