comic / evalutils

evalutils helps users create extensions for grand-challenge.org
https://grand-challenge.org
MIT License
23 stars 9 forks source link

Getting error "TypeError: Execute() takes 2 positional arguments but 4 were given" on submission #317

Closed prash-p closed 3 years ago

prash-p commented 3 years ago

Description

I have a private evaluation site using evalutils for the Docker container (https://sub-eval-10-latim-multi-us-bone-seg.grand-challenge.org/evaluation/). When I submit a method, it fails and I get a vague error "TypeError: Execute() takes 2 positional arguments but 4 were given". I have previously submitted two other methods successfully so I am not sure what the issue is this time around.

jmsmkn commented 3 years ago

The error comes from something you have implemented within your evaluation method:

2021-09-02T19:57:18.514076864Z File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
2021-09-02T19:57:18.514085129Z "__main__", mod_spec)
2021-09-02T19:57:18.514092829Z File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
2021-09-02T19:57:18.514100073Z exec(code, run_globals)
2021-09-02T19:57:18.514106838Z File "/opt/evaluation/evaluation.py", line 376, in <module>
2021-09-02T19:57:18.514114838Z Usbonesegeval().evaluate()
2021-09-02T19:57:18.514121764Z File "/home/evaluator/.local/lib/python3.6/site-packages/evalutils/evalutils.py", line 113, in evaluate
2021-09-02T19:57:18.514129211Z self.score()
2021-09-02T19:57:18.514135881Z File "/home/evaluator/.local/lib/python3.6/site-packages/evalutils/evalutils.py", line 287, in score
2021-09-02T19:57:18.514143547Z self.score_case(idx=idx, case=case), ignore_index=True
2021-09-02T19:57:18.514151071Z File "/opt/evaluation/evaluation.py", line 47, in score_case
2021-09-02T19:57:18.514158597Z pred = select.Execute(pred, 0, SimpleITK.sitkUInt8)
2021-09-02T19:57:18.514174886Z TypeError: Execute() takes 2 positional arguments but 4 were given

This is not an issue with this library, you can run your code locally with the users submission to debug things like this (replace the example test data and run the test script).