You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Hey Hadi,
Nice to e-meet and thank you for the proposal!
I don't expect that adding this abstraction will be high on my priority.
In an ideal world, if you (or someone else) have a specific new method you'd like to propose,
you could propose it and based on what it is we can think of what would be the best way to add it.
In such a case I would be very open to further discuss your proposal.
If you're open to make the implementations I'd be super happy to review your PR, and we can also discuss here (based in your idea) what could be a
way to structure the work.
But if this is a general abstraction for someone else, in the future, to use it for adding more methods, then I'd keep this in mind, but am not likely to prioritize working on it in the near future.
Makes sense?
WDYT?
On Mon, 22 May 2023, 19:17 Hadi Gharibi, ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#54>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHOJBXOWLL2CYNROH444KTXHOGRRANCNFSM6AAAAAAYKVOJ6M>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
The existing implementation of the
adjust
function in theliteral
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 theSample
object and specifies the return type asTypedDict
. Here's an example of how it could be implemented:e.g:
It should be possible to pass this callable as a strategy to
adjust
function and it would call this function instead.The text was updated successfully, but these errors were encountered: