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

[DataFrame] Pass lengths to _default_index instead of df #1621

Merged
merged 2 commits into from
Feb 27, 2018

Conversation

kunalgosar
Copy link
Contributor

@kunalgosar kunalgosar commented Feb 27, 2018

Passing the DataFrame to the remote function caused a significant performance regression, due to serialization. This passes in just the length object instead.

This also moves the lengths computation to the same remote function. This way all expensive metadata computation is asynchronous.

@devin-petersohn devin-petersohn changed the title Pass lengths to _default_index instead of df [DataFrame] Pass lengths to _default_index instead of df Feb 27, 2018
@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/3995/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/4007/
Test PASSed.

Copy link
Member

@devin-petersohn devin-petersohn left a comment

Choose a reason for hiding this comment

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

Looks great!

@@ -1321,7 +1323,8 @@ def _maybe_casted_values(index, labels=None):
values, mask, np.nan)
return values

new_index = ray.get(_default_index.remote(new_obj)).index
_, new_index = _compute_length_and_index.remote(new_obj._df)
Copy link
Member

Choose a reason for hiding this comment

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

The trouble here is that we're recomputing the lengths, but they should already be known. We can optimize this later.

@devin-petersohn
Copy link
Member

Passed private-travis. OK to merge. Thanks @kunalgosar!

@devin-petersohn devin-petersohn merged commit 34664db into ray-project:master Feb 27, 2018
@kunalgosar kunalgosar deleted the lengths branch March 14, 2018 20:57
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.

3 participants