Skip to content

Conversation

@charlesbluca
Copy link
Collaborator

@charlesbluca charlesbluca commented Nov 29, 2021

Closes #332

It looks like the relatively expensive deep copy of the context done in PredictModelPlugin should be circumvented by simply adding the temporary table we create to the original context and dropping it before returning; this also unblocks usage with multi-GPU cuML models.

cc @VibhuJawa

@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2021

Codecov Report

Merging #334 (25c121d) into main (0c05787) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
- Coverage   95.74%   95.73%   -0.01%     
==========================================
  Files          65       65              
  Lines        2841     2840       -1     
  Branches      429      429              
==========================================
- Hits         2720     2719       -1     
  Misses         75       75              
  Partials       46       46              
Impacted Files Coverage Δ
dask_sql/physical/rel/custom/predict.py 95.45% <100.00%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c05787...25c121d. Read the comment docs.

Copy link
Collaborator

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work on this @charlesbluca . Looks reasonable to me . Have requested some testing to ensure we dont miss anything.

Comment on lines -115 to -116
sql_outer_query = tmp_context._to_sql_string(outer_select)
df = tmp_context.sql(sql_outer_query)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me but can we should a test to ensure we have not broken anything. Like are we sure that sql_outer_query does not add anything .

Maybe we add a test to verify that the registered tables still line up and nothing temporary is left around.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I will add that in now

Copy link
Collaborator

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick work on this @charlesbluca . LGTM.

@charlesbluca charlesbluca merged commit 2ee29ea into dask-contrib:main Nov 30, 2021
@charlesbluca charlesbluca deleted the remove-model-context-copy branch January 19, 2022 21:22
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

Successfully merging this pull request may close these issues.

[BUG]Predict fails with multi GPU cuML models

3 participants