# Getting a mismatch in db count and Ui Count

**URL:** <https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183>\
**Category:** Uncategorized\
**Created:** [April 16, 2024, 12:38pm UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183 "2024-04-16T12:38:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juhi](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Juhi](https://support.prodi.gy/u/Juhi)\
**Post date:** [April 16, 2024, 12:38pm UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/1 "2024-04-16T12:38:23Z")

</div>

Hello Team  
One problem I encountered when working on the Prodigy image tagging was that the database output did not match the user interface.I've posted the screenshots here. The count difference is visible. For db-out, I used the following command:prodigy db-out databasename "/filepath".Moreover, I'm using two sessions.  
Version 1.11.0a8 of Prodigy

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/5/55ae2ab3e27fc6e17ff12c63a545ad2e54236f2c.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/a/a375850ffd69db220b5369a0eb07c271690b9ec8.png)

Thanks and Regards,  
Juhi

---

<div class="post-metadata">

**Author:** ![Vinoth](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vinoth/32/4375_2.png) [@Vinoth](https://support.prodi.gy/u/Vinoth)\
**Post date:** [April 17, 2024, 7:51am UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/2 "2024-04-17T07:51:22Z")

</div>

Hi,

I am also facing the problem where I could see different counts between prodigy db-out and Prodigy UI interface. FYI, tagging process broken into two sessions.  
Version: v1.11

Thanks

---

<div class="post-metadata">

**Author:** ![magdaaniol](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/magdaaniol/32/2787_2.png) [@magdaaniol](https://support.prodi.gy/u/magdaaniol)\
**Post date:** [April 17, 2024, 12:08pm UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/3 "2024-04-17T12:08:47Z")

</div>

Hi @Juhi and @Vinoth ,

Could please run `prodigy db-stats {dataset_name}` and share the output? In principle, the TOTAL in the UI should correspond to the number of examples exported with `db-out`.  
Was this annotation done with multiple annotators?  
@Vinoth are you also running the `image.manual` recipe?

---

<div class="post-metadata">

**Author:** ![Vinoth](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/vinoth/32/4375_2.png) [@Vinoth](https://support.prodi.gy/u/Vinoth)\
**Post date:** [April 17, 2024, 3:20pm UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/4 "2024-04-17T15:20:29Z")

</div>

Hi @magdaaniol ,

Yes, I am running image.manual recepie.

I hope, there is no such command "prodigy db-stats \<dataset\_name\>". If we use the command, we were getting error as "Can't find recipe or command 'db-stats'."

Thanks

---

<div class="post-metadata">

**Author:** ![magdaaniol](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/magdaaniol/32/2787_2.png) [@magdaaniol](https://support.prodi.gy/u/magdaaniol)\
**Post date:** [April 18, 2024, 7:40am UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/5 "2024-04-18T07:40:07Z")

</div>

Ooops sorry! That was `prodigy stats <dataset_name>` (thanks for the info!)

---

<div class="post-metadata">

**Author:** ![Juhi](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@Juhi](https://support.prodi.gy/u/Juhi)\
**Post date:** [April 18, 2024, 11:07am UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/6 "2024-04-18T11:07:26Z")

</div>

Hi @magdaaniol  
yes annotation done with multiple annotators by creating sessions like this  
[http://xxx.xx.xxx.xxx:7879/?session=username](http://xxx.xx.xxx.xxx:7879/?session=username)  
this the output of the command prodigy stats \<dataset\_name\> and the UI count showed was 700

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/5/50b0a44eee0783db59251f0f5b1720739d83d1db.png)

Thanks

---

<div class="post-metadata">

**Author:** ![magdaaniol](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/magdaaniol/32/2787_2.png) [@magdaaniol](https://support.prodi.gy/u/magdaaniol)\
**Post date:** [April 19, 2024, 8:04am UTC](https://support.prodi.gy/t/getting-a-mismatch-in-db-count-and-ui-count/7183/7 "2024-04-19T08:04:47Z")

</div>

Thanks @Juhi. Is there any chance that your annotators reported seeing the same example more than once? If so, I think you hit an issue related to Prodigy serving duplicate examples to the UI (we've seen that happening, especially in multi-user sessions) which makes it look in the UI like you've gone through X examples, but upon saving to the DB they get deduplicated which is why the number is lower.

This was fixed in superior versions of Prodigy, so I can only recommend upgrading, at least to 1.12+ and ideally to the latest version.

If there are no reports of duplicates in the stream, you would need to recreate the annotation with more verbose logs turned on by running Prodigy with the environment variable `PRODIGY_LOGGING=basic` to see log statements for the `/give_answers` endpoint.  
It could also be worth trying with a fresh dataset.

In any case, this is just to understand whether there's some oddity about your input dataset as we won't be patching this version of Prodigy. 1.11.0 is a really old version and I also see that you're on a nightly experimental alpha (which itself was superseded with superior alphas). Since Prodigy 1.12 we've done a comprehensive refactoring of the task streaming mechanism to address issues related to duplicates and multi-user sessions that previous versions were known for.
