Skip to content

list_evaluations_setup() fails when number of evaluations not a multiple of 100 #838

Closed

Description

@Neeratyoy

np.split looks to split the array into N equal spaced arrays wherein N is 100 here. As a result, it appears that for any combination of input where the number of evaluations returned is not a multiple of 100, this function will throw an error.

To recreate:

what works

import openml
df = openml.evaluations.list_evaluations_setups(function='predictive_accuracy', flow=[8353], task=[6], output_format='dataframe', parameters_in_separate_columns=True)

what fails

df = openml.evaluations.list_evaluations_setups(function='predictive_accuracy', flow=[5891], task=[37], output_format='dataframe', parameters_in_separate_columns=True)

comparison

Since list_evaluations_setup calls list_evaluations internally.

df = openml.evaluations.list_evaluations(function='predictive_accuracy', flow=[8353], task=[6], output_format='dataframe')
print(len(df)) #1000

df = openml.evaluations.list_evaluations(function='predictive_accuracy', flow=[5891], task=[37], output_format='dataframe')
print(len(df)) #2429

Activity

  1. sahithyaravi commented on Oct 16, 2019

    @sahithyaravi
    Member

    Yes, just encountered this myself yesterday, will fix this

  2. mfeurer commented on Oct 16, 2019

    @mfeurer
    Collaborator

    Will it be possible to use the listing helper in https://github.com/openml/openml-python/blob/develop/openml/utils.py ?

  3. sahithyaravi commented on Oct 16, 2019

    @sahithyaravi
    Member

    list_setups does use the helper already, but doesnt work with large results unlike list_evaluations.

  4. mfeurer commented on Oct 16, 2019

    @mfeurer
    Collaborator
  5. sahithyaravi commented on Oct 16, 2019

    @sahithyaravi
    Member

    It is a problem with list_setups when we supply the setup_id parameter. When we supply more than 100 setup ids, the api request doesnt happen(URL length may be exceeded). This will be a problem with all listing calls. I want to get a list of setups, by supplying a list of setup ids

  6. mfeurer commented on Oct 16, 2019

    @mfeurer
    Collaborator

    Got it, thanks for the explanation.

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

Metadata

Metadata

Assignees

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