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

Add draft of Dask NEP-18 advances #15

Merged
merged 5 commits into from
Mar 15, 2019
Merged

Conversation

pentschev
Copy link
Member

No description provided.

@pentschev
Copy link
Member Author

@mrocklin let me know what you think of this.

@mrocklin
Copy link
Member

mrocklin commented Mar 6, 2019

cc also @jakirkham

@mrocklin
Copy link
Member

mrocklin commented Mar 6, 2019

I think it's a fine blogpost. Some large scale comments/questions:

  1. You compare Dask+NumPy to CuPy. I'm curious if it would make more sense to compare NumPy to CuPy

  2. You didn't mention the Scikit-Learn results. I think that these are important to include, and also demonstrate honesty. Your current numbers demonstrate that there is clear promise to this approach, which is all we really need to accomplish here. This is clearly a work in progress.

  3. I think you're copying the format in http://blog.dask.org/2019/03/04/building-gpu-groupbys, which mostly just listed a bunch of issues. FWIW I'm not sure that this is the most exciting way to start a post. I was mostly just lazy this time around. These posts may be better to pattern off of, they definitely got more readership

    You should probably refer to the first one in your post regardless

    You might consider starting with the theme of "We want to run GLM algorithms on GPUs. Can we reuse existing libraries to accomplish this quickly?" the answer being, "Yes, if we do a bit of work to align a few libraries together, but first, here are some results"

@pentschev
Copy link
Member Author

Thanks for the comments, replying:

  1. That's a good point, I think it makes sense to compare also to NumPy alone, but I think Dask+NumPy should still be there, after all, that's the whole point of Dask-GLM, isn't it? Plus, I'm currently assuming (which may not be the case) that Dask+NumPy should be faster than NumPy alone.

  2. That's another good point, I intentionally left those out for now because I didn't yet have the time to have a glance at what's going on. For example, I still don't know what solver Scikit-Learn is using by default, so that comparison may be unfair.

  3. This was totally coincidental, I had already started writing this post in this format about 2 weeks ago. I agree to your point, but I think we're still too early for that kind of writing, there's not much exciting stuff I can write about with the current limitations, namely single-threaded Dask+CuPy and lack of more interesting Dask-GLM examples. I think if we wait 2-4 weeks we could do another much more interesting blog post in the format you're proposing, including what I mentioned in item 2. Regardless, I will refer to your previous Dask GPU post, thanks for reminding me.

@mrocklin
Copy link
Member

mrocklin commented Mar 6, 2019

Plus, I'm currently assuming (which may not be the case) that Dask+NumPy should be faster than NumPy alone.

Dask adds some overhead. I think it's worth trying out NumPy in isolation as well.

For example, I still don't know what solver Scikit-Learn is using by default, so that comparison may be unfair.

I don't think that users care. All's fair in love, war, and performance.

Scikit-Learn uses solvers that are asymptotically better than those used in dask-glm. Dask-GLM's solvers were designed to scale well, but they're not particularly good on a single node.

there's not much exciting stuff I can write about with the current limitations

Well, there are larger scale things here that I think are very exciting. You've gotten a pre-existing codebase to mostly work on GPUs without doing that much work. From an ecosystem perspective that's pretty interesting.

@pentschev
Copy link
Member Author

Scikit-Learn uses solvers that are asymptotically better than those used in dask-glm. Dask-GLM's solvers were designed to scale well, but they're not particularly good on a single node.

I didn't mean to say exclusively about compute performance, but just in general, perhaps quality of results could be very much different, and I was trying to avoid leaving an untruthful conclusion for the reader based on information I don't currently have, for example: "CuPy is slower than Scikit-Learn, thus it must mean it's quality is much higher".

Well, there are larger scale things here that I think are very exciting. You've gotten a pre-existing codebase to mostly work on GPUs without doing that much work. From an ecosystem perspective that's pretty interesting.

Ok, so you're talking more from a design perspective now, indeed in that you're right. I was thinking more from performance and application points of view. I will then have to rethink a bit what and how to write it to emphasize that perspective.

@mrocklin
Copy link
Member

mrocklin commented Mar 6, 2019

I didn't mean to say exclusively about compute performance, but just in general, perhaps quality of results could be very much different, and I was trying to avoid leaving an untruthful conclusion for the reader based on information I don't currently have, for example: "CuPy is slower than Scikit-Learn, thus it must mean it's quality is much higher".

Sure, you can give the context above, saying that Scikit-Learn just uses better algorithms that converge more quickly .

You may also want to read through: http://blog.dask.org/2017/03/22/dask-glm-1

@pentschev
Copy link
Member Author

Alright, I updated this, please tell me what you think @mrocklin.

@mrocklin
Copy link
Member

Looking forward to reading through this.

Also, cc @jakirkham for review

Copy link
Member

@mrocklin mrocklin left a comment

Choose a reason for hiding this comment

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

Some feedback.

In general this looks great to me. The examples are very motivating and it's a fun read.

_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
_posts/2019-03-11-dask-nep18.md Outdated Show resolved Hide resolved
@TomAugspurger
Copy link
Member

TomAugspurger commented Mar 13, 2019 via email

@pentschev
Copy link
Member Author

@TomAugspurger that's possible, I'll try to investigate causes later, but it's probably useful to try out those in Dask-ML too.

@pentschev
Copy link
Member Author

For the time being, I don't plan any more changes. Ready for another review.

@mrocklin
Copy link
Member

I think that this looks great. The one suggestion I would make is in the axes of the timing plots.

The main point of these plots seems to be to compare the relative performance between NumPy and CuPy. To this end, it would be useful to have the NumPy and CuPy performance numbers on the same axes, so that one can see visually when the CuPy numbers are higher or lower than NumPy's numbers. Currrently they look visually similar at first until you look at the numbers on the y-axes.

I could imagine rearranging the plots so that there is a different plot per solver, throwing all of the solvers into one plot, or keeping the two separate plots, but fixing the axes of the second plot to match the axes of the first.

@mrocklin
Copy link
Member

(I'm also happy to just push the merge button, this is great as it is)

@pentschev
Copy link
Member Author

@mrocklin I think the split by solver is a better solution. When first plotting the graphs I thought it would be too cluttered, but I did it now and it looks fine to me. So if there's no more comments, from my side it's ok to merge.

@mrocklin
Copy link
Member

Those plots do look nice :)

@mrocklin
Copy link
Member

I plan to merge this PR in an hour if there are no objections.

@mrocklin mrocklin merged commit 1a968ff into dask:gh-pages Mar 15, 2019
@mrocklin
Copy link
Member

I've merged this in and it's live. It's a bit late in the week though to start publicizing it. I'll tweet about it early next week.

@pentschev
Copy link
Member Author

Now that you've mentioned it, maybe we should have waited until Monday to publish that. Well, too late now I guess. :)

@mrocklin
Copy link
Member

I've just made it a draft, which should keep it off of the TOC for now.

ca2fe51

@pentschev
Copy link
Member Author

Nice, please publish it at the most appropriate time, you probably have experience in knowing which time is best, and I don't.

@jakirkham
Copy link
Member

Thanks @pentschev. This is really great.

I read an earlier version of this and really like the improvements you have made since. @mrocklin and I played with a benchmark based on your work earlier this week and it really shows the improvements you have made here! 😄

Sorry I was late to review. Have submitted some small tweaks to the text in PR ( #18 ). These are mostly minor syntax changes. Though please take a look and make sure I haven't lost something in the changes.

As another note, it would be nice to list the BLAS and LAPACK library used with NumPy for the CPU case (can just run python -c "import numpy; numpy.show_config()" to check). Would be good to get the version of the BLAS and LAPACK libraries as well.

@pentschev pentschev deleted the dask-nep18 branch April 2, 2019 12:32
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.

6 participants