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

[FEATURE] Chainging the way Sample take strategy for adjust #54

Open
hadi-gharibi opened this issue May 22, 2023 · 1 comment
Open

[FEATURE] Chainging the way Sample take strategy for adjust #54

hadi-gharibi opened this issue May 22, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@hadi-gharibi
Copy link

The existing implementation of the adjust function in the literal module, which relies on a separate mapper to import the appropriate function, complicates the process of adding new strategies. To address this issue, I propose introducing a new function signature that clearly indicates the minimal arguments for the Sample object and specifies the return type as TypedDict. Here's an example of how it could be implemented:

e.g:

return_func_sig = TypedDict({ 
        "weight": pd.DataFrame,
        "model": {
            "method": str,
            "X_matrix_columns": List[str],
            ...
            }
)

Callable[[pd.DataFrame, pd.DataFrame, ...], return_func_sig]

It should be possible to pass this callable as a strategy to adjust function and it would call this function instead.

@hadi-gharibi hadi-gharibi added the enhancement New feature or request label May 22, 2023
@talgalili
Copy link
Contributor

talgalili commented May 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants