"No tasks available" on page refresh

This is likely because the example only includes 3 annotation tasks, i.e. only one batch. When you load Prodigy for the first time, it’ll fetch the first batch from the server. On second load, there’s no second batch available anymore, so you see the “No tasks available” message.

To avoid this and make Prodigy keep yielding tasks until they’re all annotated, you can wrap the streaming logic in a while True loop:

def get_stream(stream):
    while True:
        for task in stream:
            yield task

Maybe this should be mentioned somewhere in the docs – I left it out of that particular example to keep it simple and not distract from the other, more important aspects of the workflow.

1 Like