{"action":"created","issue":{"url":"https://api.github.com/repos/sods/paramz/issues/2","labels_url":"https://api.github.com/repos/sods/paramz/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sods/paramz/issues/2/comments","events_url":"https://api.github.com/repos/sods/paramz/issues/2/events","html_url":"https://github.com/sods/paramz/pull/2","id":119918285,"number":2,"title":"getstate should return a dictionary","user":{"login":"mrksr","id":5184063,"avatar_url":"https://avatars.githubusercontent.com/u/5184063?v=3","gravatar_id":"","url":"https://api.github.com/users/mrksr","html_url":"https://github.com/mrksr","followers_url":"https://api.github.com/users/mrksr/followers","following_url":"https://api.github.com/users/mrksr/following{/other_user}","gists_url":"https://api.github.com/users/mrksr/gists{/gist_id}","starred_url":"https://api.github.com/users/mrksr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrksr/subscriptions","organizations_url":"https://api.github.com/users/mrksr/orgs","repos_url":"https://api.github.com/users/mrksr/repos","events_url":"https://api.github.com/users/mrksr/events{/privacy}","received_events_url":"https://api.github.com/users/mrksr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-02T11:02:40Z","updated_at":"2015-12-02T11:36:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sods/paramz/pulls/2","html_url":"https://github.com/sods/paramz/pull/2","diff_url":"https://github.com/sods/paramz/pull/2.diff","patch_url":"https://github.com/sods/paramz/pull/2.patch"},"body":"Pickle requires the __getstate__-function to return a dictionary (or maybe False?). The empty list results in an UnpicklingError. In the following example, `model` is a toy GPy-model which had one call to its `optimize`-method. This leads to a call of `GPy.load` failing with the same error which I followed to the optimizers.\r\n\r\n> In [58]: o = model.optimization_runs[0]\r\n> \r\n> In [59]: pickle.dumps(o)\r\n> Out[59]: b'\\x80\\x03cparamz.optimization.optimization\\nopt_SCG\\nq\\x00)\\x81q\\x01]q\\x02b.'\r\n> \r\n> In [60]: pickle.loads(pickle.dumps(o))\r\n> UnpicklingError                           Traceback (most recent call last)\r\n> <ipython-input-60-8199b6dff27d> in <module>()\r\n> ----> 1 pickle.loads(pickle.dumps(o))\r\n> \r\n> UnpicklingError: state is not a dictionary\r\n"},"comment":{"url":"https://api.github.com/repos/sods/paramz/issues/comments/161267990","html_url":"https://github.com/sods/paramz/pull/2#issuecomment-161267990","issue_url":"https://api.github.com/repos/sods/paramz/issues/2","id":161267990,"user":{"login":"mzwiessele","id":1563689,"avatar_url":"https://avatars.githubusercontent.com/u/1563689?v=3","gravatar_id":"","url":"https://api.github.com/users/mzwiessele","html_url":"https://github.com/mzwiessele","followers_url":"https://api.github.com/users/mzwiessele/followers","following_url":"https://api.github.com/users/mzwiessele/following{/other_user}","gists_url":"https://api.github.com/users/mzwiessele/gists{/gist_id}","starred_url":"https://api.github.com/users/mzwiessele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzwiessele/subscriptions","organizations_url":"https://api.github.com/users/mzwiessele/orgs","repos_url":"https://api.github.com/users/mzwiessele/repos","events_url":"https://api.github.com/users/mzwiessele/events{/privacy}","received_events_url":"https://api.github.com/users/mzwiessele/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T11:36:29Z","updated_at":"2015-12-02T11:36:29Z","body":"Could you updatethe tests pleas, as well? in the optimization tests, we test for the state of the trace being an empty list.\r\n\r\nthen I will happily merge :)"}}