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

creating a Polars-based version of ImputationPandasDataset #157

Open
rvandewater opened this issue Oct 17, 2024 · 0 comments
Open

creating a Polars-based version of ImputationPandasDataset #157

rvandewater opened this issue Oct 17, 2024 · 0 comments

Comments

@rvandewater
Copy link
Owner

          _:hammer_and_wrench: Refactor suggestion_

Consider creating a Polars-based version of ImputationPandasDataset

The renaming of ImputationDataset to ImputationPandasDataset is consistent with other Pandas-based classes. However, to complete the transition to Polars and maintain consistency across the codebase, consider the following suggestions:

  1. Add a deprecation warning to this class, similar to the one added to CommonPandasDataset.
  2. Create a new ImputationPolarsDataset class that uses Polars operations instead of Pandas.
  3. Update the ampute_data function to work with Polars DataFrames, or create a Polars-compatible version.

Example deprecation warning:

@gin.configurable("ImputationPandasDataset")
class ImputationPandasDataset(CommonPandasDataset):
    def __init__(self, *args, **kwargs):
        warnings.warn("ImputationPandasDataset is deprecated. Use ImputationPolarsDataset instead.", DeprecationWarning, stacklevel=2)
        super().__init__(*args, **kwargs)
        # ... rest of the __init__ method ...

Originally posted by @coderabbitai[bot] in #155 (comment)

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

No branches or pull requests

1 participant