sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.3k stars 449 forks source link

Improve caching for spaces of modular forms #16321

Open saraedum opened 10 years ago

saraedum commented 10 years ago

Spaces of modular forms do manual caching which causes trouble at #11895. This ticket aims to cleanup the code to use cached_method, and CachedRepresentation where appropriate.

It also moves HeckeModule from Module_old to Module.

Depends on #15692 Depends on #16328

Component: modular forms

Keywords: days71, sd87

Work Issues: waiting for patchbot to run tests

Author: Julian Rüth

Branch/Commit: u/saraedum/ticket/16321 @ fd89bbb

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

saraedum commented 10 years ago

Dependencies: #16328

saraedum commented 10 years ago

Branch: u/saraedum/ticket/16321

saraedum commented 10 years ago

Author: Julian Rüth

saraedum commented 10 years ago

New commits:

88cab96Replaced all manual caching in modular forms spaces with the @cached_method decorator
6a0ff98Ambient spaces for modular forms have CachedRepresentation
2740494Remove explicit caching from ModularForms()
3b99babSet ModularFormSpace.Element
324bef3Added a category parameter to Module
ea6afa9Merge branch 'ticket/16328' into ticket/16321
aee72f7fixed a typo in category_object.pyx
6963cccTurned HeckeModule from a Module_old into a Module
saraedum commented 10 years ago

Commit: 6963ccc

saraedum commented 10 years ago

Description changed:

--- 
+++ 
@@ -1 +1,3 @@
-Spaces of modular forms do manual caching which causes trouble at #11895. This ticket aims to cleanup the code to use `cached_method`, factories, and `UniqueRepresentation` where appropriate.
+Spaces of modular forms do manual caching which causes trouble at #11895. This ticket aims to cleanup the code to use `cached_method`, and `UniqueRepresentation` where appropriate.
+
+It also moves `HeckeModule` from `Module_old` to `Module`.
saraedum commented 10 years ago

Description changed:

--- 
+++ 
@@ -1,3 +1,3 @@
-Spaces of modular forms do manual caching which causes trouble at #11895. This ticket aims to cleanup the code to use `cached_method`, and `UniqueRepresentation` where appropriate.
+Spaces of modular forms do manual caching which causes trouble at #11895. This ticket aims to cleanup the code to use `cached_method`, and `CachedRepresentation` where appropriate.

 It also moves `HeckeModule` from `Module_old` to `Module`.
saraedum commented 10 years ago

Work Issues: pickling issues

saraedum commented 10 years ago
comment:6

Although all doctests pass, I think there are still potential issues with pickling when caches contain circular references.

saraedum commented 10 years ago

Changed work issues from pickling issues to pickling issues, cached_method parameters incorrect

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

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

79457aaMerge branch 'develop' into ticket/16321
ce27b84Removed sage.misc.cachefunc.ClearCacheOnPickle
e27e316Propagate key of a @cached_method correctly
94fcddbMerge branch 'u/saraedum/ticket/16337' of git://trac.sagemath.org/sage into ticket/15692
72fce8bAdded a pickle parameter for @cached_method
0717849Enable pickling of the cache for groebner_basis()
561072fMerge branch 'u/saraedum/ticket/15692' of git://trac.sagemath.org/sage into ticket/16321
c74f601Fix incorrect usage of key parameter of @cached_method for ambient spaces of modular forms
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from 6963ccc to c74f601

saraedum commented 10 years ago

Changed dependencies from #16328 to #15692, #16328

saraedum commented 10 years ago

Changed author from Julian Rüth to Julian Rueth

saraedum commented 10 years ago

Changed work issues from pickling issues, cached_method parameters incorrect to none

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

Changed commit from c74f601 to 410d21e

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 10 years ago

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

9eab84bMerge branch 'develop' into ticket/15692
410d21eMerge branch 'ticket/15692' into ticket/16321
fchapoton commented 10 years ago
comment:13

failing doctests, see patchbot reports

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

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

c182f40Remove ClearCacheOnPickle meta class
e3a7eb4Do not pickle cached methods
3a0be11Merge remote-tracking branch 'trac/u/saraedum/ticket/15692' into t/16321/ticket/16321
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 410d21e to 3a0be11

saraedum commented 8 years ago

Changed keywords from none to days71

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

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

fd89bbbMerge remote-tracking branch 'origin/develop' into t/16321/ticket/16321
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 7 years ago

Changed commit from 3a0be11 to fd89bbb

saraedum commented 7 years ago

Work Issues: waiting for patchbot to run tests

saraedum commented 7 years ago

Changed keywords from days71 to days71, sd87

saraedum commented 7 years ago

Changed author from Julian Rueth to Julian Rüth

4dfe6752-6233-4f7f-8e0e-e1363b12c1b7 commented 7 years ago
comment:20

This doesn't want to import ClearCacheOnPickle

aly@aly-laptop:~/Sage/develop/sage$ ./sage -tp src/sage/modular/
Traceback (most recent call last):
  File "/home/aly/Sage/develop/sage/src/bin/sage-runtests", line 89, in <module>
    from sage.doctest.control import DocTestController
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/doctest/control.py", line 33, in <module>
    from .sources import FileDocTestSource, DictAsObject
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/doctest/sources.py", line 33, in <module>
    from .parsing import SageDocTestParser
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/doctest/parsing.py", line 55, in <module>
    from sage.all import RealIntervalField
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/all.py", line 105, in <module>
    from sage.algebras.all   import *
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/algebras/all.py", line 22, in <module>
    import sage.algebras.catalog as algebras
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/algebras/catalog.py", line 62, in <module>
    from sage.algebras.iwahori_hecke_algebra import IwahoriHeckeAlgebra as IwahoriHecke
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/algebras/iwahori_hecke_algebra.py", line 34, in <module>
    from sage.combinat.root_system.weyl_group import WeylGroup
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/__init__.py", line 118, in <module>
    from . import type_A
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/type_A.py", line 17, in <module>
    from . import ambient_space
  File "/home/aly/Sage/develop/sage/local/lib/python2.7/site-packages/sage/combinat/root_system/ambient_space.py", line 16, in <module>
    from sage.misc.cachefunc import ClearCacheOnPickle
ImportError: cannot import name ClearCacheOnPickle