# Exclude flag in custom recipe not excluding examples

**URL:** <https://support.prodi.gy/t/exclude-flag-in-custom-recipe-not-excluding-examples/3676>\
**Category:** Uncategorized\
**Tags:** usage, solved\
**Created:** [November 29, 2020, 1:29pm UTC](https://support.prodi.gy/t/exclude-flag-in-custom-recipe-not-excluding-examples/3676 "2020-11-29T13:29:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ks1893](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@ks1893](https://support.prodi.gy/u/ks1893)\
**Post date:** [November 29, 2020, 1:29pm UTC](https://support.prodi.gy/t/exclude-flag-in-custom-recipe-not-excluding-examples/3676/1 "2020-11-29T13:29:35Z")

</div>

I'm having an issue where prodigy continues to present examples that I've already evaluated even though I am using the exclude flag. My example is a bit more complicated but I've reproduced with a simple recipe:

```python
@prodigy.recipe(
    "my-simple-recipe",
    dataset=prodigy.recipe_args["dataset"],
    exclude=prodigy.recipe_args["exclude"],
)
def my_simple_recipe(dataset, exclude):
    
    options = [
        {"id": cat, "text": cat}
        for cat in ["a","b","c"]
    ]

    def load_stream():
        for i in range(100):
            task = {
                "text": f"{i} is the {i}th element",
                "options": options
            }
            yield task

    return {        
        "view_id": "choice",
        "stream": load_stream(),
        "exclude": exclude,
        "dataset": dataset,
    }

```

I run the recipe like so:

```python
prodigy my-simple-recipe test_data --exclude test_data -F simple_recipe.py

```

Then I categorize the first few examples. A db-out of test\_data shows:

```python
{"text":"0 is the 0th element","options":[{"id":"a","text":"a"},{"id":"b","text":"b"},{"id":"c","text":"c"}],"_input_hash":-1544660227,"_task_hash":2109103467,"_session_id":null,"_view_id":"choice","config":{"choice_style":"single"},"accept":["a"],"answer":"accept"}
{"text":"1 is the 1th element","options":[{"id":"a","text":"a"},{"id":"b","text":"b"},{"id":"c","text":"c"}],"_input_hash":-1462450044,"_task_hash":1917332331,"_session_id":null,"_view_id":"choice","accept":["b"],"config":{"choice_style":"single"},"answer":"accept"}
{"text":"2 is the 2th element","options":[{"id":"a","text":"a"},{"id":"b","text":"b"},{"id":"c","text":"c"}],"_input_hash":-580414110,"_task_hash":1095989901,"_session_id":null,"_view_id":"choice","accept":["c"],"config":{"choice_style":"single"},"answer":"accept"}

```

Now, if I come back and run the recipe again, I'd expect to see the text "3 is the 3th element" but instead I see "0 is the 0th element" again. I've confirmed the input and task hash for this example is exactly the same as what is already in the dataset by using set\_hashes as [described here](https://support.prodi.gy/t/exclude-for-custom-recipes-what-am-i-missing/396). Note that I also tried using set\_hashes inside the stream generator per the example but that didn't help either. I'm confused why it's not excluding them as expected.

Any guidance on how to make this work? Thank you.

---

<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:** [November 30, 2020, 12:42am UTC](https://support.prodi.gy/t/exclude-flag-in-custom-recipe-not-excluding-examples/3676/2 "2020-11-30T00:42:03Z")

</div>

Hi! Which version of Prodigy are you using? Can you upgrade to the latest or otherwise, check if setting `"feed_overlap": false` in your config solves the problem?

---

<div class="post-metadata">

**Author:** ![ks1893](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@ks1893](https://support.prodi.gy/u/ks1893)\
**Post date:** [November 30, 2020, 1:44am UTC](https://support.prodi.gy/t/exclude-flag-in-custom-recipe-not-excluding-examples/3676/3 "2020-11-30T01:44:54Z")

</div>

Currently 1.10.4, just updated to 1.10.5 and now it works as expected (did not set `"feed_overlap": false` as I see in the release notes its default value is `false`).

Thank you!
