Skip to content

Pickling error #4112

@ahartikainen

Description

@ahartikainen

Description of your problem

ArviZ compiles and then saves the model with the pickle.

https://github.com/arviz-devs/arviz/blob/master/arviz/tests/helpers.py

Please provide the full traceback.

_pickle.PicklingError: Can't pickle <class 'theano.gof.utils.TensorVariable_pymc3_Deterministic'>: attribute lookup TensorVariable_pymc3_Deterministic on theano.gof.utils failed

https://dev.azure.com/ArviZ/ArviZ/_build/results?buildId=3384&view=logs&j=d2997e82-6058-5a08-e2d8-90083b995f86&t=b9272250-ff1d-580c-f3a3-e4ef0487d78f&l=80

Please provide any additional information below.

Last successful commit was run against cb05743
And first failed commit was run against f0b9577

I think #4076 caused this (not sure)

https://github.com/pymc-devs/pymc3/blob/56ccabbdb88343fc0dc7c34672dd7509574dc3ac/pymc3/util.py#L158

Maybe this could be fixed as

    try:
        if isinstance(var, TensorVariable):
            return super(TensorVariable, var).__str__()
    except:
        pass
    return str(var)

Versions and main components

  • PyMC3 Version: master
  • Theano Version: 1.0.5
  • Python Version: 3.8
  • Operating system: Ubuntu
  • How did you install PyMC3: pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions