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

Allow apply udf to reference global modules in cudf.pandas #15569

Merged

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Apr 18, 2024

Description

closes #15548

_replace_closurevars creates a new function by replacing objects with their fast versions. When creating the new function, it populates globals from the result of inspect.getclosurevars, but it don't think it comprehensively returns all the globals accessible to the function (function.__globals__)

To minimize the change, the "fast globals" are still sourced from inspect.getclosurevars, and those update the old_function.__globals__ when creating a new function.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added bug Something isn't working non-breaking Non-breaking change cudf.pandas Issues specific to cudf.pandas labels Apr 18, 2024
@mroeschke mroeschke requested a review from a team as a code owner April 18, 2024 23:42
@github-actions github-actions bot added the Python Affects Python cuDF API. label Apr 18, 2024
@galipremsagar galipremsagar added this to the Proxying - cudf.pandas milestone Apr 19, 2024
@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 21350fc into rapidsai:branch-24.06 Apr 19, 2024
70 checks passed
@mroeschke mroeschke deleted the bug/cudfpandas/udf_global branch April 19, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cudf.pandas Issues specific to cudf.pandas non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
2 participants