Skip to content
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

Exception when MedRecord is created from Polars DataFrame with pl.int8 values #285

Open
JabobKrauskopf opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels
fix Related to fixing a bug p-critical Priority: Critical python Related to the python medmodels rust Related to rust medmodels

Comments

@JabobKrauskopf
Copy link
Member

Check what the underlying issue is and fix. Could be related to #284

To reproduce:

import polars as pl
import medmodels as mm

test_data = pl.DataFrame(
    {
        "ID_PAT": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
        "SMALL_INT": [4, -6, 30, -42, -37, 60, -105, 49, -88, 36],
    }
)

test_data = test_data.with_columns([
    pl.col("ID_PAT").cast(pl.Int64),
    pl.col("SMALL_INT").cast(pl.Int8)
])


medrecord = mm.MedRecord.builder().add_nodes((test_data, "ID_PAT"), group="patients").build()
@JabobKrauskopf JabobKrauskopf added rust Related to rust medmodels python Related to the python medmodels fix Related to fixing a bug p-critical Priority: Critical labels Jan 13, 2025
@JabobKrauskopf JabobKrauskopf self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Related to fixing a bug p-critical Priority: Critical python Related to the python medmodels rust Related to rust medmodels
Projects
None yet
Development

No branches or pull requests

1 participant