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

Issues with using sqlite backend for pymc #30

Open
jhamrick opened this issue Dec 10, 2015 · 1 comment
Open

Issues with using sqlite backend for pymc #30

jhamrick opened this issue Dec 10, 2015 · 1 comment

Comments

@jhamrick
Copy link

I'm not sure whether to report this to kabuki or HDDM, but the error occurred in a file from kabuki, so I figured I'd report this here...

Saving traces into a sqlite backend seems to cause issues. First, I see warnings like this:

WARNING: Will not save custom link functions.
WARNING: Custom link functions will not be loaded.

and then when I try to concatenate my models, I get the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-16-21a90b2e13a0> in <module>()
      1 #m1 = kabuki.utils.concat_models(models_1)
----> 2 m2 = kabuki.utils.concat_models(models_2)

/Users/jhamrick/miniconda3/envs/hddm/lib/python2.7/site-packages/kabuki/utils.pyc in concat_models(models, concat_traces)
    160             assert node.__name__ == target_node.__name__, "Node names do not match. You have to pass identical models."
    161             if concat_traces:
--> 162                 target_node.trace._trace[0] = np.concatenate([target_node.trace[:], node.trace[:]])
    163             else:
    164                 target_node.trace._trace[i+1] = node.trace[:]

AttributeError: 'Trace' object has no attribute '_trace'

It seems to possibly be the same issue as this one: pymc-devs/pymc#790

@twiecki
Copy link
Member

twiecki commented Dec 10, 2015

Thanks for the report @jhamrick.

The warning is unrelated to the backend and just says that if you provide a custom link function it will not save that with the model.

The error is probably related to the backend. Maybe the sqlite backend does not provide a ._trace attribute? The issue you pointed to is pymc3, HDDM uses pymc2. I guess I'm not sure what that could be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants