Git Product home page Git Product logo

Comments (5)

jrbourbeau avatar jrbourbeau commented on May 23, 2024

Are there cases where shuffle= isn't specific enough? All other things being equal, I think a shorter name is better

from dask.

phofl avatar phofl commented on May 23, 2024

shuffle for me is just very unspecific, could be a bool or something else. shuffle_method expresses the intent of the option very clearly. It's inconsistent with the config option as well

from dask.

hendrikmakait avatar hendrikmakait commented on May 23, 2024

shuffle for me is just very unspecific, could be a bool or something else. shuffle_method expresses the intent of the option very clearly. It's inconsistent with the config option as well

+1

from dask.

jrbourbeau avatar jrbourbeau commented on May 23, 2024

Hmm, there's a tradeoff between making things very explicit and having overly long parameter names. In my mind shuffle="p2p" is clear enough (especially if it's clearly documented and used consistently as a keyword).

Though to be clear, I don't care a ton about this specific case -- my hope is most people are happy with the default shuffle algorithm and won't ever need to specify this option. I mostly just want to bring up the explicit vs. concise tradeoff to make sure we're considering it.

from dask.

hendrikmakait avatar hendrikmakait commented on May 23, 2024

shuffle for me is just very unspecific, could be a bool or something else. shuffle_method expresses the intent of the option very clearly. It's inconsistent with the config option as well

Note that the shuffle keyword can be a bool for groupby-aggregates:

dask/dask/dataframe/groupby.py

Lines 1332 to 1341 in 2d8f6d5

shuffle : bool or str, optional
Whether a shuffle-based algorithm should be used. A specific
algorithm name may also be specified (e.g. ``"tasks"`` or ``"p2p"``).
The shuffle-based algorithm is likely to be more efficient than
``shuffle=False`` when ``split_out>1`` and the number of unique
groups is large (high cardinality). Default is ``False`` when
``split_out = 1``. When ``split_out > 1``, it chooses the algorithm
set by the ``shuffle`` option in the dask config system, or ``"tasks"``
if nothing is set.
kwargs: tuple or pd.NamedAgg, optional

In light of this, renaming shuffle to shuffle_method for all the cases where only a method is accepted is even more relevant to highlight the distinction.

We may also want to reconsider dumping all kinds of things into shuffle for groupby-aggregates.

from dask.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.