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
If we allow the profile functions in the Polars rust layer to accept a callback (in the same way we do for collect), we can get the timing information. We'd need to change this profile function in the rust layer like
// PyLazyFrame::profilefnprofile(&self,py:Python,lambda_post_opt:Option<PyObject>) -> PyResult<(PyDataFrame,PyDataFrame)>{// follow the logic in collect}
And we'd need to add an engine kwarg to profile function in polars.
defprofile(
self,
*,
...
engine: EngineType="cpu",
) ->tuple[DataFrame, DataFrame]:
...
# Following the logic in collect
We'd would also need to somehow pass a callable from rust to python that emulates state.node_timer.store, so we can time the nodes correctly. For example, in python_scan.rs, we'd want
Description
The new API would look similar to
collect
. Eg.If we allow the profile functions in the Polars rust layer to accept a callback (in the same way we do for collect), we can get the timing information. We'd need to change this profile function in the rust layer like
And we'd need to add an engine kwarg to profile function in polars.
We'd would also need to somehow pass a callable from rust to python that emulates
state.node_timer.store
, so we can time the nodes correctly. For example, in python_scan.rs, we'd wantAnd we'd make the
node_timer
bridge to in pyo3 look something likeAny advice or comments on the approach is appreciated?
cc. @wence-
The text was updated successfully, but these errors were encountered: