Closed timodonnell closed 7 years ago
Ok, this is pretty much in place now.
Ahhh, you're right, sorry.
On Feb 15, 2017 9:34 PM, "timodonnell" notifications@github.com wrote:
@timodonnell commented on this pull request.
In mhcflurry/common.py https://github.com/hammerlab/mhcflurry/pull/82#discussion_r101434177:
- Returns
- string
- """
- start = time.time()
- result = hashlib.sha1(df.to_msgpack()).hexdigest()
- print("Generated dataframe hash in %0.2f sec" % (time.time() - start))
- return result
+def freeze_object(o):
- """
- Recursively convert nested dicts and lists into frozensets and tuples.
- """
- if isinstance(o, dict):
- return frozenset({k: freeze_object(v) for k, v in o.items()}.items())
Not sure I understand -- anything that can be a key in a dict (e.g. a tuple) is already immutable, so there's no need to handle those
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/hammerlab/mhcflurry/pull/82#discussion_r101434177, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC9Obe6dVkOU7edyW5mIcScyxeR8NhTks5rc7XPgaJpZM4L_ccU .
Cool if I merge this, @iskandr ?
:+1:
On Thu, Feb 16, 2017 at 10:44 PM, timodonnell notifications@github.com wrote:
Cool if I merge this, @iskandr https://github.com/iskandr ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hammerlab/mhcflurry/pull/82#issuecomment-280542199, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC9ORxwGTkFo_k50xbaHMdL9W_cwwshks5rdReygaJpZM4L_ccU .
Infrastructure for antigen presentation models, which integrate MHC affinity, cleavage, and other features.
This is currently a WIP. My goal is to get ensemble training working and then merge this.