Skip to content

Listing calls & URL size limit of OpenML server #468

Open

Description

@janvanrijn

The OpenML server has a URL size limit, which prevents us from doing listing calls with too many filters. For example, when I want to filter on 1000 task id's it is likely that the call will fail. It would be great if we can somehow automatically detect and catch this in the list all function. However, this is a though problem, as sometimes there are multiple filters (e.g., per task and per setup)

Extending this limit is not a legitimate fix, as the problem will re-occur when using bigger filters.

Activity

  1. janvanrijn commented on May 10, 2018

    @janvanrijn
    MemberAuthor

    Just realized that there is a straightforward fix for this, i.e., allowing also post variables for the listing functions (although POST means authentication)

    @mfeurer what do you think?

  2. mfeurer commented on May 11, 2018

    @mfeurer
    Collaborator

    Is the maximum URL length documented somewhere? Also, what's the server response? If the server response is something we can parse/display nicely, is there a reason to act upon this in addition?

    Also, how would you handle this except raising an exception? Do you want to "parse" the query on the python side to chunk it? We could go back to post again, but we reverted that a while ago to not have to authenticate, so I don't think that's a great idea. Maybe we can catch a server exception 'URL too long' and then try a post request?

  3. janvanrijn commented on May 15, 2018

    @janvanrijn
    MemberAuthor

    I think this issue will mostly occur with setups, as these can not be filtered by other means (tasks, runs, etc)

    I added a function to the openml contrib library:
    https://github.com/openml/openml-python-contrib/blob/master/openmlcontrib/setups/functions.py

  4. mfeurer commented on Nov 12, 2019

    @mfeurer
    Collaborator

    This can be reproduced with:

    import openml
    
    openml.datasets.list_datasets(
        data_id=list(range(10000))
    )

    @janvanrijn we can add a helper to either call the get or post request depending on the length of the URI. However, to do so we need to know the maximal length the server allows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions