# function set\_hashes

**URL:** <https://support.prodi.gy/t/function-set-hashes/6006>\
**Category:** Uncategorized\
**Tags:** solved\
**Created:** [October 4, 2022, 9:12pm UTC](https://support.prodi.gy/t/function-set-hashes/6006 "2022-10-04T21:12:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 5, 2022, 4:54pm UTC](https://support.prodi.gy/t/function-set-hashes/6006/2 "2022-10-05T16:54:09Z")

</div>

Hi @Vincent!

`set_hashes` calls `get_hash` (`from prodigy.util import get_hash`), which will set `input_hash` based on any values for keys `"text", "image", "html", "input"` using [`murmurhash`](https://github.com/explosion/murmurhash).

`task_hash` is similar but will prefix the task with the `input_hash` and a new `murmurhash` hash for values with keys `"spans", "label", "options", "arcs"`.

Also, it's important to be aware of a small quirk if you have any keys named in the ignore list. See this post for more details:

> [@How does "set\_hashes" work ?](https://support.prodi.gy/t/how-does-set-hashes-work/5686/2):
>
> Hi Jim. You have stumbled apon a keyname that's in the default ignore list and I can totally imagine the confusion. Let's go over it step-by-step. If the key is just text, nothing unexpected is happening. from prodigy import set\_hashes paths = ["a", "b", "c"] [set\_hashes({"text": p}) for p in paths] # [{'text': 'a', '\_input\_hash': -1808989213, '\_task\_hash': -1053809049}, # {'text': 'b', '\_input\_hash': 748838038, '\_task\_hash': -150095526}, # {'text': 'c', '\_input\_hash': -600324218, '\_task\_…

Hopefully this helps!

---

_[View the full topic](https://support.prodi.gy/t/function-set-hashes/6006)._
