Skip to content

BUG/TST statespace pickling error in statsmodels 0.8 #3892

Closed

Description

@josef-pkt

new Debian bug report

with cython 2.6 and statsmodels version 0.8
there is no error in master with cython 2.6, so this must be fixed by the statespace refactoring in master

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873512
4 cases like the following

======================================================================
ERROR: statsmodels.tsa.statespace.tests.test_save.test_sarimax
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/1st/statsmodels-0.8.0/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/tsa/statespace/tests/test_save.py", line 22, in test_sarimax
    res.save('test_save_sarimax.p')
  File "/build/1st/statsmodels-0.8.0/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/base/wrapper.py", line 72, in save
    save_pickle(self, fname)
  File "/build/1st/statsmodels-0.8.0/debian/python-statsmodels/usr/lib/python2.7/dist-packages/statsmodels/iolib/smpickle.py", line 15, in save_pickle
    cPickle.dump(obj, fout, protocol=-1)
  File "stringsource", line 2, in statsmodels.tsa.statespace._statespace.zStatespace.__reduce_cython__
TypeError: self._design,self._initial_state,self._initial_state_cov,self._obs,self._obs_cov,self._obs_intercept,self._selected_state_cov,self._selection,self._state_cov,self._state_intercept,self._transition cannot be converted to a Python object for pickling

Activity

  1. bashtage commented on Aug 29, 2017

    @bashtage
    Member

    Didn't I fix this in master?

  2. josef-pkt commented on Aug 30, 2017

    @josef-pkt
    MemberAuthor

    @bashtage Thanks, with that hint I found the PR

    It looks like #3402 hasn't been backported and is not included in 0.8, but I don't know if it would apply to 0.8 (given the statespace refactoring).
    also Debian uses python 2.7 and I don't see whether #3402 is only relevant for python 3.6.

    Based on the Debian report it looks like it only showed up after upgrading cython

  3. tillea commented on Sep 26, 2017

    @tillea

    Hi,
    I was watching at the Debian bug report which causes some pressure due to several packages depending from statsmodels. Is there any solution at the horizon?

  4. bashtage commented on Sep 26, 2017

    @bashtage
    Member
  5. tillea commented on Sep 26, 2017

    @tillea
  6. bashtage commented on Sep 26, 2017

    @bashtage
    Member
  7. bashtage commented on Sep 26, 2017

    @bashtage
    Member
  8. bashtage commented on Aug 10, 2018

    @bashtage
    Member
  9. ChadFulton commented on Aug 10, 2018

    @ChadFulton
    Member

    Thanks @bashtage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions