# Review recipe unable to save a dataset to itself

**URL:** <https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620>\
**Category:** Uncategorized\
**Tags:** usage, review\
**Created:** [August 26, 2021, 5:03am UTC](https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620 "2021-08-26T05:03:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darrel](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Darrel](https://support.prodi.gy/u/Darrel)\
**Post date:** [August 26, 2021, 5:03am UTC](https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620/1 "2021-08-26T05:03:43Z")

</div>

I'm trying to use the review recipe to look through and correct past annotations for a dataset. This works fine if im using a separate destination dataset from my source, but I want to save review results back to source. I tried running review with the same source and destination datasets like shown below:

`python -m prodigy review NER_titles_2 NER_titles_2`

This runs ok the first time, but after saving a few review examples and running again, the following error pops up:

`Conflicting view_id values in datasets Can't review annotations of 'review' (in dataset 'NER_titles_2') and 'ner_manual' (in previous examples)`

Is what I'm trying to perform doable? If so how can I fix this error?

Thanks!

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [August 26, 2021, 11:56pm UTC](https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620/2 "2021-08-26T23:56:22Z")

</div>

Hi! I'm not sure what your end goal is, but in general, you should always use a different dataset to save your final reviewed corpus – otherwise, you end up with duplicate and inconsistent data. Datasets in Prodigy are append-only by design so you never lose any data points (because overwriting your annotations by accident would be bad).

The `review` recipe will create a final copy of the examples with the versions it was based on and your final decision. So you typically want to have that in a separate dataset that you can then train from, not mixed in with your original annotations. (If you really want to, you can always remove your original annotations later – although I'm not sure that's really necessary.)

If you ended up with your one dataset containing mixed annotations of differnt types, the easiest solution would be to export the data using `db-out`, removing the lines added from the review, and re-uploading the data with `db-in`. You can then start again with a separate review dataset.

---

<div class="post-metadata">

**Author:** ![Horlando](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/horlando/32/2350_2.png) [@Horlando](https://support.prodi.gy/u/Horlando)\
**Post date:** [April 18, 2022, 4:50pm UTC](https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620/3 "2022-04-18T16:50:17Z")

</div>

Hi!  
I stopped at the "remove added lines from revision and send data" part, but I couldn't find the "new lines from revision" in the structure. What are these review lines like?

---

<div class="post-metadata">

**Author:** ![ryanwesslen](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ryanwesslen/32/2969_2.png) [@ryanwesslen](https://support.prodi.gy/u/ryanwesslen)\
**Post date:** [July 13, 2022, 1:57pm UTC](https://support.prodi.gy/t/review-recipe-unable-to-save-a-dataset-to-itself/4620/4 "2022-07-13T13:57:49Z")

</div>

hi @Horlando!

Thanks for your question and sorry about the delay to get back to you!

> [@Horlando](#):
>
> I stopped at the "remove added lines from revision and send data" part, but I couldn't find the "new lines from revision" in the structure. What are these review lines like?

Probably the easiest you could identify the "new lines (aka annotations) from the revision" is by filtering by `"_session_id"`.

The session ID is assigned when a user opens the app and makes a request to the server requesting a new batch of questions. By default it will have a time stamped session ID. Alternatively, you [can use the `?session=my_review`](https://prodi.gy/docs/api-web-app#multi-user-sessions) where it would set the `_session_id` to `my_review` plus the dataset you're reviewing (e.g., `ner_data`).

Also instead of outputting the file using `db-out` you could use the database components to directly pull your annotations to filter records for that session, create a new dataset (`my_review_dataset`) for that session, then add those records to that dataset.

```python
from prodigy.components.db import connect

db = connect()
examples = db.get_dataset("ner_data")

# get only my_review session
my_review = [eg for eg in examples if eg.get("_session_id") == "ner_data-my_review"]
db.add_dataset("my_review_dataset", session=True)
db.add_examples(my_review, datasets=["my_review_dataset"])

```

Let us know if this answers your question.
