Skip to content

Choosing sort on a column may complain about a url link #213

Open

Activity

  1. hyparam-jbsmith commented on Apr 11, 2025

    @hyparam-jbsmith
    Author

    When attempting to sort on the column for the above referenced parquet file, on the language_score column, this issue presents.

  2. self-assigned this
    on Apr 13, 2025
  3. severo commented on Apr 14, 2025

    @severo
    Contributor

    Did you notice this in the hightable demo?

    https://hyparam.github.io/demos/hyparquet/?key=https%3A%2F%2Fhuggingface.co%2Fdatasets%2FHuggingFaceFW%2Ffineweb%2Fresolve%2Fmain%2Fdata%2FCC-MAIN-2013-20%2F000_00000.parquet%3Fdownload%3Dtrue

    I could not reproduce this in the demo or in the hyperparam tool:

    npm i -g hyperparam
    hyp https://huggingface.co/datasets/HuggingFaceFW/fineweb/resolve/main/data/CC-MAIN-2013-20/000_00000.parquet?download=true
    # or locally
    hyp 000_00000.parquet

    Maybe it's due to a temporary issue on the hosting platform.

  4. severo commented on Apr 14, 2025

    @severo
    Contributor

    What I got, after several tries, is a 429 error (Too Many Requests). And effectively, nothing happens later: no automatic retry, and clicking again the same column again and again does not trigger refetch.

    I guess we should be more robust to some errors in the >2k requests we send.

  5. severo commented on Apr 14, 2025

    @severo
    Contributor

    But I didn't get this error: 400 Bad Request url not supported, which should not be retried in any case, I think.

  6. severo commented on Apr 14, 2025

    @severo
    Contributor

    cc @platypii what do you think?

  7. severo commented on Apr 14, 2025

    @severo
    Contributor

    Not an issue with hightable, transferring to https://github.com/hyparam/hyperparam-cli

  8. transferred this issue fromhyparam/hightableon Apr 14, 2025
  9. severo commented on Apr 14, 2025

    @severo
    Contributor

    [optimization?]

    Sorting on language_score sends hundreds of range requests of size ~7kB. When doing the same on the text column, the range requests are around 1-2MB, which seems to be a better balance between the number of requests and their size. Note that the group size in this parquet file (https://huggingface.co/datasets/HuggingFaceFW/fineweb/resolve/main/data/CC-MAIN-2013-20/000_00000.parquet) is set to 1,000 rows, we don't control this.

    We could be smarter and avoid fetching multiple small ranges (ie: multiple row groups) at once when possible. Drawback: It would add some complexity to the code.

    cc @platypii


  10. severo commented on Apr 14, 2025

    @severo
    Contributor

    Maybe we should let the user pass fetch as a parameter of asyncBufferFromUrl in hyparquet (instead of requestInit). This way, in hyperparam-cli we could depend on https://www.npmjs.com/package/fetch-retry for example, and retry automatically when receiving a 429 Too Many Request error, for example, respecting the Retry-After header.


  11. severo commented on Apr 14, 2025

    @severo
    Contributor

    I opened hyparam/hyparquet#73 to pass fetch to hyparquet utils.

    I think it's useful, even if we have other ideas to implement in hyperparam-cli, without touching hyparquet, to avoid triggering rate limits, such as reducing the number of requests:

    1. by grouping small range requests into a bigger one (Fetch several Parquet row groups when appropriate #234)
    2. by improving the cache logic
  12. severo commented on Apr 16, 2025

    @severo
    Contributor

    re 429 on huggingface specifically, logging in (ie: passing a token with the requests) helps raise the rate-limiting threshold (source).

    So, if we identify the source is a Hugging Face URL (move https://github.com/hyparam/space/blob/master/src/lib/huggingfaceSource.ts here?), we can tweak the error message in case the user is not logged in.


    See #235

  13. removed their assignment
    on Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions