Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P PyFstat
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

ATTENTION: This Gitlab instance will undergo extended maintenance on 2023-04-12 at 06:00 UTC. The downtime will approximately take 1 hour. Please plan ahead accordingly. For questions please contact atlas_admin@aei.mpg.de

  • Gregory Ashton
  • PyFstat
  • Issues
  • #1
Closed
Open
Issue created Apr 11, 2017 by Gregory Ashton@GregAshtonOwner

PicklingError on saving sampler

Message from David Keitel:

Hi Greg,

is it generally advised to install all dependency packages through pip, instead of relying on some system-installed versions? Everything except corner is in my Debian repositories, so I tried only pip-ing that one, but then to be able to mcmc.run() also had to install bashplotlib which was not in your list. After that, the transient example runs mostly through, though I get some emcee RuntimeWarnings (see below) and after the apparently still-successful MCMC run comes a fatal PicklingError (see further below).

If you think using all-pip packages is a likely cure, I'll simply try that.

Greetings, David

11:59 INFO    : Running final burn and prod with 200 steps
  0%|                                                          | 0/200 [00:00<?, ?it/s]/usr/lib/python2.7/dist-packages/emcee/ptsampler.py:335: RuntimeWarning: invalid value encountered in subtract
  - lnprob[:, jupdate::2]
/usr/lib/python2.7/dist-packages/emcee/ptsampler.py:340: RuntimeWarning: invalid value encountered in less
  accepts = logrs < logpaccept
/usr/lib/python2.7/dist-packages/emcee/ptsampler.py:384: RuntimeWarning: invalid value encountered in subtract
  paccept = dbeta * (logl[i, iperm] - logl[i - 1, i1perm])
/usr/lib/python2.7/dist-packages/emcee/ptsampler.py:389: RuntimeWarning: invalid value encountered in greater
  asel = (paccept > raccept)
/usr/lib/python2.7/dist-packages/emcee/ptsampler.py:402: RuntimeWarning: invalid value encountered in subtract
  - dbeta * logl[i - 1, i1perm[asel]]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 200/200 [01:38<00:00,  2.03it/s]
12:00 INFO    : Mean acceptance fraction: [ 0.16785  0.3322   0.0562 ]
12:00 INFO    : Tswap acceptance fraction: [ 0.10255  0.10935  0.11615]
12:00 INFO    : Plotting temperature 0 chains
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyfstat/mcmc_based_searches.py", line 419, in run
    self.save_data(sampler, samples, lnprobs, lnlikes)
  File "pyfstat/mcmc_based_searches.py", line 971, in save_data
    pickle.dump(d, File)
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 236, in dump
    pik.dump(obj)
  File "/usr/lib/python2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 835, in save_module_dict
    StockPickler.save_dict(pickler, obj)
  File "/usr/lib/python2.7/pickle.py", line 655, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.7/pickle.py", line 687, in _batch_setitems
    save(v)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 425, in save_reduce
    save(state)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 835, in save_module_dict
    StockPickler.save_dict(pickler, obj)
  File "/usr/lib/python2.7/pickle.py", line 655, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.7/pickle.py", line 687, in _batch_setitems
    save(v)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 1004, in save_instancemethod0
    obj.im_class), obj=obj)
  File "/usr/lib/python2.7/pickle.py", line 401, in save_reduce
    save(args)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/pickle.py", line 554, in save_tuple
    save(element)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 425, in save_reduce
    save(state)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 835, in save_module_dict
    StockPickler.save_dict(pickler, obj)
  File "/usr/lib/python2.7/pickle.py", line 655, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.7/pickle.py", line 687, in _batch_setitems
    save(v)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 425, in save_reduce
    save(state)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 835, in save_module_dict
    StockPickler.save_dict(pickler, obj)
  File "/usr/lib/python2.7/pickle.py", line 655, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/lib/python2.7/pickle.py", line 687, in _batch_setitems
    save(v)
  File "/usr/lib/python2.7/pickle.py", line 331, in save
    self.save_reduce(obj=obj, *rv)
  File "/usr/lib/python2.7/pickle.py", line 396, in save_reduce
    save(cls)
  File "/usr/lib/python2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/lib/python2.7/dist-packages/dill/dill.py", line 1231, in save_type
    StockPickler.save_global(pickler, obj)
  File "/usr/lib/python2.7/pickle.py", line 754, in save_global
    (obj, module, name))
pickle.PicklingError: Can't pickle <type 'lalpulsar.PulsarDopplerParams'>: it's not found as importlib.PulsarDopplerParams

(Note that import lalpulsar lalpulsar.PulsarDopplerParams is getting found, so probably(?) the error is not from the SWIG-LAL installation side.)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking