We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please provide a minimal, self-contained, and reproducible example.
def test_pickling(): import cloudpickle with pm.Model() as model: pm.Normal("one") model = cloudpickle.loads(cloudpickle.dumps(model)) model.recompute_initial_point()
Please provide the full traceback.
> model.recompute_initial_point() pymc/tests/test_initial_point.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pymc/model.py:945: in recompute_initial_point fn = make_initial_point_fn(model=self, return_transformed=True) pymc/initial_point.py:185: in make_initial_point_fn graph.replace_all(zip(rng_nodes, new_rng_nodes), import_missing=True) ../../.pyenv/versions/3.8.7/envs/pymc3/lib/python3.8/site-packages/aesara/graph/fg.py:554: in replace_all self.replace(var, new_var, **kwargs) ../../.pyenv/versions/3.8.7/envs/pymc3/lib/python3.8/site-packages/aesara/graph/fg.py:515: in replace new_var = var.type.filter_variable(new_var, allow_convert=True) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = RandomStateType, other = RandomStateSharedVariable(<RandomState(PCG64) at 0x7FEE7A091240>), allow_convert = True def filter_variable( self, other: Union[Variable, D], allow_convert: bool = True ) -> Variable: r"""Convert a symbolic variable into this `Type`, if compatible. For the moment, the only `Type`\s compatible with one another are `TensorType` and `GpuArrayType`, provided they have the same number of dimensions, same broadcasting pattern, and same dtype. If `Type`\s are not compatible, a ``TypeError`` should be raised. """ if not isinstance(other, Variable): # The value is not a Variable: we cast it into # a Constant of the appropriate Type. other = self.Constant(type=self, data=other) if other.type != self and allow_convert: other2 = self.convert_variable(other) if other2 is not None: return other2 if other.type != self: > raise TypeError( "Cannot convert Type %(othertype)s " "(of Variable %(other)s) into Type %(self)s. " "You can try to manually convert %(other)s into a %(self)s." % dict(othertype=other.type, other=other, self=self) ) E TypeError: Cannot convert Type RandomStateType (of Variable RandomStateSharedVariable(<RandomState(PCG64) at 0x7FEE7A091240>)) into Type RandomStateType. You can try to manually co nvert RandomStateSharedVariable(<RandomState(PCG64) at 0x7FEE7A091240>) into a RandomStateType.
Related to #4582
The text was updated successfully, but these errors were encountered:
should be related to #4983
Sorry, something went wrong.
Update Aesara dependency and add regression test for pymc-devs#5090
e52b2f7
Update Aesara dependency and add regression test for #5090
c3833bc
ricardoV94
Successfully merging a pull request may close this issue.
Recompute_test_point fails after pickling
Please provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
Complete error traceback
Related to #4582
Versions and main components
The text was updated successfully, but these errors were encountered: