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

Makes meds-transform and polars requirements more flexible. #103

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"polars==1.6.0", "pyarrow", "loguru", "hydra-core==1.3.2", "numpy", "scipy<1.14.0", "pandas", "tqdm", "xgboost",
"scikit-learn", "hydra-optuna-sweeper", "hydra-joblib-launcher", "ml-mixins", "meds==0.3.3", "meds-transforms==0.0.7",
"polars>=1.6.0,<=1.17.1", "pyarrow", "loguru", "hydra-core==1.3.2", "numpy", "scipy<1.14.0", "pandas", "tqdm", "xgboost",
"scikit-learn", "hydra-optuna-sweeper", "hydra-joblib-launcher", "ml-mixins", "meds>=0.3.3", "meds-transforms>=0.0.7",
]

[tool.setuptools_scm]
Expand Down
7 changes: 3 additions & 4 deletions src/MEDS_tabular_automl/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,9 @@ def wrap(
... lambda df: df.with_columns(pl.col("c") * 2),
... lambda df: df.filter(pl.col("d") > 4)
... ]
>>> wrap(in_fp, out_fp, read_fn, write_fn, *transform_fns)
Traceback (most recent call last):
...
polars.exceptions.ColumnNotFoundError: unable to find column "d"; valid columns: ["a", "b", "c"]
>>> import pytest
>>> with pytest.raises(Exception):
... wrap(in_fp, out_fp, read_fn, write_fn, *transform_fns)
>>> assert cache_directory.is_dir()
>>> cache_fp = cache_directory / "step_0.output"
>>> pl.read_csv(cache_fp)
Expand Down
Loading