kingsdigitallab / kdl-vqa

Python tool for batch visual question answering (BVQA).
MIT License
1 stars 0 forks source link

Lock time out can be too short #2

Open geoffroy-noel-ddh opened 1 month ago

geoffroy-noel-ddh commented 1 month ago

On CPU processing 10+ questions with moondream can easily last much longer than the time out on the lock in the answer file.

This means that a second instance can start processing the same image as the first one. And continue to do so over the rest of the collection. Essentially making the second instance useless and wasting resources.

Option 1: Increasing the time out

Doing so can be annoying during testing phase, when forced interruption and quick retry are frequent. Also there is never a guarantee that an arbitrary duration will very be enough.

Option 2: Locker keeps updating the time while processing

Approach is more sound. But it is difficult to implement because bvqa sends all the questions at once to the describer. The describer only returns when all completed. So we either need: