Recently, new files for RL workers have been added:
We will need new tests for these.
warning note: the concerned part is still under development. Therefore, tests should be added for utility functions first (which are guaranteed to be used), and then those for the newer part.
Thanks, @nikochiko for adding this and I'd suggest you to work on the utils first as rl_submission_worker.py might change since it is still under development.
Moreover, @vkartik97 will be there to help you since he has written this code during his GSoC 2019.
(I'm also available for help.)
@RishabhJain2018 Thanks for updating me with the development status. I will start work on the utils part then. And, I am already in touch with @vkartik97 over this issue 馃槃.
Perfect!
I think this is probably an error in the code: https://github.com/Cloud-CV/EvalAI/blob/master/scripts/workers/worker_util.py#L58
The returned response will be dict object (see make_request) and reference to response.status_code should raise an AttributeError.
Am I missing something?
For the fix, I was thinking we could add an extra argument:
def make_request(self, return_status_code=False):
.
.
.
if return_status_code:
return response.status_code # instead of response.json()
return response.json()
For the fix, I was thinking we could add an extra argument:
No, avoid using flags in open source codebases. Why? Maintaining code that makes use of flags is that the number of states grows quickly, and there are almost always unhandled states.
Thank you for sharing that. I will keep that in mind.
Then how about this:
We leave the make_request method untouched and make changes in the delete_message_from_sqs_queue function,
According to the views.py, the returned response contains this message.
As this message can clarify if the deleting was successful, we can return the response dict as it is or return "success" or "error" depending on the keys of the response dict.
What do you think?
Edit:
@RishabhJain2018 Thanks for the fixing PR: https://github.com/Cloud-CV/EvalAI/pull/2575