Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster seed is no longer hashable #19440

Closed
fchapoton opened this issue Oct 20, 2015 · 16 comments
Closed

cluster seed is no longer hashable #19440

fchapoton opened this issue Oct 20, 2015 · 16 comments

Comments

@fchapoton
Copy link
Contributor

With the recent change in the cluster code,

sage: Q= ClusterQuiver(['D',4])
sage: hash(Q)
Traceback (most recent call last):
...
TypeError: <class 'sage.combinat.cluster_algebra_quiver.quiver.ClusterQuiver'> is not hashable

And this has very bad consequences !

CC: @tscrim @darijgr @egunawan @sagetrac-gmoose05 @stumpc5

Component: combinatorics

Keywords: cluster

Author: Frédéric Chapoton

Branch/Commit: be4fa45

Reviewer: Christian Stump

Issue created by migration from https://trac.sagemath.org/ticket/19440

@fchapoton fchapoton added this to the sage-6.10 milestone Oct 20, 2015
@fchapoton
Copy link
Contributor Author

Changed keywords from none to cluster

@fchapoton
Copy link
Contributor Author

comment:2

here is a branch not working yet


New commits:

01b2b3ctrac #19440 trying to fix the hash for cluster quivers and cluster seeds

@fchapoton
Copy link
Contributor Author

Branch: public/19440

@fchapoton
Copy link
Contributor Author

Commit: 01b2b3c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 20, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

704edcetrac #19440 another try for the hash

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 20, 2015

Changed commit from 01b2b3c to 704edce

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

comment:5

Your changes look fine to me. In general, I am worried that the code gets slower and slower... I would like to do a few tests whether this also applies to your proposed changes.

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

comment:6

stupid question (here and elsewhere): how do I see which version your code is based on? I would prefer not to pull it and check it out to then see that I first have to recompile sage for many hours.

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

comment:7

Okay, got it: git log trac/public/19440. I first made the mistake to try to look at the local version using git log public/19440.

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

comment:8

Okay, it was slow and it is not slower now...

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

Reviewer: Christian Stump

@stumpc5
Copy link
Contributor

stumpc5 commented Oct 20, 2015

Author: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Oct 21, 2015

comment:10

Fails on 32-bit

sage -t --long src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
**********************************************************************
File "src/sage/combinat/cluster_algebra_quiver/cluster_seed.py", line 871, in sage.combinat.cluster_algebra_quiver.cluster_seed.ClusterSeed.__hash__
Failed example:
    hash(Q)  # indirect doctest
Expected:
    -5649412990944896369
Got:
    222337679
**********************************************************************
1 item had failures:
   1 of   3 in sage.combinat.cluster_algebra_quiver.cluster_seed.ClusterSeed.__hash__
    [538 tests, 1 failure, 133.37 s]

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 21, 2015

Changed commit from 704edce to be4fa45

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 21, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

be4fa45trac #19440 hash for 32 and 64-bit

@vbraun
Copy link
Member

vbraun commented Oct 21, 2015

Changed branch from public/19440 to be4fa45

@vbraun vbraun closed this as completed in dcae258 Oct 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants