OFA-Sys / OFA

Official repository of OFA (ICML 2022). Paper: OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Framework
Apache License 2.0
2.4k stars 247 forks source link

Evaluation: TypeError: 'NoneType' object is not subscriptable #332

Closed xcvil closed 1 year ago

xcvil commented 1 year ago

In evaluate.py line 159:

if isinstance(scores[0], tuple):

I would suggest considering the NoneType scenario, e.g., in OFA/utils/eval_utils.py line 55.

So it will be bug-free if you modify evaluate.py line 159 as below:

if scores and isinstance(scores[0], tuple):
JustinLin610 commented 1 year ago

Good! Review has started yet.