OpenML icon indicating copy to clipboard operation
OpenML copied to clipboard

Failure while attaching runs to study on Test server

Open Neeratyoy opened this issue 4 years ago • 4 comments

Description

The openml-python API has a unit test failing with a server exception. In the unit test, a study is being successfully uploaded, following which more runs retrieved from the server are being attached to this study. However, this fails with the error:

openml.exceptions.OpenMLServerException: https://test.openml.org/api/v1/xml/study/684/attach returned code 1045: Problem attaching entities. Please ensure to only attach entities that exist - None

Steps/Code to Reproduce

The POST request to the server which results in the above error should be reproducible using curl:

curl --data "api_key=610344db6388d9ba34f6db45a3cf71de" --data "ids=166,167,168,386,480,481,512,516,520,772" https://test.openml.org/api/v1/xml/study/685/attach

or Python:

import requests
r = requests.post(url="https://test.openml.org/api/v1/xml/study/685/attach", data={'ids': '166,167,168,386,480,481,512,516,520,772', 'api_key': 'c0c42819af31e706efe1f4b88c23c6c1'}, files=None)
print(r.status_code)
print(r.text)

Expected Results

Should return a response code of 200.

Neeratyoy avatar Dec 09 '20 14:12 Neeratyoy

Could you rerun this, please? I can't find these study/run ids, probably because the test server was reset in the mean time.

Also, could you check that the study you create is a run study (not a task study / benchmark suite)? We have two types of studies and that can be confusing. You can't attach runs to a study of type 'task'.

joaquinvanschoren avatar Feb 09 '21 13:02 joaquinvanschoren

Also, I don't understand this: https://github.com/openml/openml-python/runs/1783495556

If this is a server issue, how it is possible that it passes for some python versions but not for others?

joaquinvanschoren avatar Feb 09 '21 13:02 joaquinvanschoren

I admit that this snippet of code in the OP, cannot be reproduced since the study and the associated runs were probably deleted in the test server cleanup. Moreover, the current state of unit tests and the test server doesn't seem to run into this issue or this unit test failing. Though it does beg the question as to why this error happened earlier and that too in a stochastic manner. And to answer your previous question too, I don't think this is a study of type task.

Neeratyoy avatar Feb 10 '21 13:02 Neeratyoy

This error magically vanished: https://github.com/openml/openml-python/pull/1024

Thanks @joaquinvanschoren for having a look at this

mfeurer avatar Feb 16 '21 18:02 mfeurer