Progress Bar

I am using spans.correct for annotating datasets. I am trying to make the progress bar shows the total examples in the dataset and then show the user how many examples are left. I checked the custom recipe for progress in your documentation but I did not know how to use it or integrate it in spans.correct. If you can please help by giving me steps on how to make it work, I would really appreciate it.

Thanks in advance for your time.

The thing is it always gives me the progress bar as infinity. Is there a way to change it to the total number of examples in the file. I tried your solution from a thread before which is adding stream = list(stream) in the recipe and it worked on spans.manual (shows a percentage with annotating). However, it doesn't work with spans.correct

Since you're using spans.correct, you must be on Prodigy v1.11, which should automatically count streams by default. Could you check in your prodigy.json and make sure that you're not setting auto_count_stream to false?

Alternatively, you can also use the total_examples_target setting to define a target number of examples to use for calculating the progress:

Adding this as a more general note for older versions, in case others come across this later: Are you sure you're adding it at the end of the recipe? If there are any steps afterwards that convert the stream to a potentially infinite generator again, it won't work.

Thank you so much. The auto_count_stream is working fine with me. Also, the stram = list(stream) worked after adding it at the end of the recipe.

1 Like