facebookresearch / dynalab

The Python library with command line tools to interact with Dynabench(https://dynabench.org/), such as uploading models.
MIT License
54 stars 10 forks source link

Submission shows "Takendown" status #96

Closed jcblaisecruz02 closed 3 years ago

jcblaisecruz02 commented 3 years ago

Hi!

We're submitting for the FLORES Small Track 2 and after configuring the handler to work for our model, both the local and integrated tests passed. Model upload finished without any problems as well, but when the model finished processing on dynabench, it immediately gave us a "takendown" status.

Here's some details on our submission:

Any ideas why the model failed to evaluate? Thanks in advance!

gwenzek commented 3 years ago

Hi, I'm seeing the following stack trace in the logs:

 Traceback (most recent call last):
   File "/usr/local/lib/python3.6/dist-packages/ts/service.py", line 100, in predict
     ret = self._entry_point(input_batch, self.context)
   File "/home/model-server/tmp/models/7b8eea2d40534878b6e9830342ab8fb0/handler.py", line 145, in handle
     input_data = _service.preprocess(data)
   File "/home/model-server/tmp/models/7b8eea2d40534878b6e9830342ab8fb0/handler.py", line 88, in preprocess
     input_data = self.sp.encode('[{}] [{}] '.format(ISO2M100[example['sourceLanguage']], ISO2M100[example['targetLanguage']]) + example['sourceText'], out_type=str)
 TypeError: bytearray indices must be integers or slices, not str

Since it's a type error, I think this should be visible by running the tests at the bottom of the reference handler: https://github.com/gwenzek/flores/blob/master/dynalab/handler.py

I think you should start from the above handler and try to put your model specific code inside the Handler class.

jcblaisecruz02 commented 3 years ago

Ah, thanks for the catch. This handler looks very different from the template in the main Dynalab repo. I'll follow this one instead. Thanks for the quick response!