@ines
Is there any method by which I can display the stream length on the UI.
Main purpose of this feature is that if the user wants to know the amount of data he has to annotate.
Yes, this actually just came up in a different thread. Here's some background on when the stream length is shown vs. when the stream is displayed as infinite:
You can try making the following edit in your recipe:
You can also supply your own custom progress
function via the recipe options. This is useful if you want to calculate the remaining examples dynamically (e.g. by checking your database).
Hi,
Where exactly should this function progress() be added?
If possible, how can I add it in base class âStreamerâ
The progress can be returned as the 'progress'
setting of a custom recipe â just like the dataset, stream, update callback etc. It takes the count of annotated questions in the session and the total annotations in the dataset as its arguments. You can find more details in the âcustom recipesâ section of your PRODIGY_README.html
. Hereâs an example:
def progress(session_count, total):
custom_progress = calculate_your_own_stuff_here()
return custom progress
In your recipe, you can then return it like this:
return {
'dataset': dataset,
# your other settings
'progress': progress
}
Prodigy doesnât really care where that function comes from and what it does â as long as itâs callable, takes the two arguments and returns a float.