Skip to content

fix: add missing method param to MvNormalSVD initialisation #428

@aphc14

Description

@aphc14

Hey guys,

I would like to use pytensor2.28.0 and Python3.13 and stumbled across a few installation issues. The description below gives some extra context on a minor PR I will send shortly.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[1], line 11
      9 import numpy as np
     10 import pandas as pd
---> 11 import pymc_extras
     12 import arviz as az
     14 import pytensor

File ~/projects/pymc-devs/pymc-extras/pymc_extras/__init__.py:16
      1 #   Copyright 2022 The PyMC Developers
      2 #
      3 #   Licensed under the Apache License, Version 2.0 (the "License");
   (...)
     12 #   See the License for the specific language governing permissions and
     13 #   limitations under the License.
     14 import logging
---> 16 from pymc_extras import gp, statespace, utils
     17 from pymc_extras.distributions import *
     18 from pymc_extras.inference.find_map import find_MAP

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/__init__.py:1
----> 1 from pymc_extras.statespace.core.compile import compile_statespace
      2 from pymc_extras.statespace.models import structural
      3 from pymc_extras.statespace.models.ETS import BayesianETS

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/core/__init__.py:4
      1 # ruff: noqa: I001
      3 from pymc_extras.statespace.core.representation import PytensorRepresentation
----> 4 from pymc_extras.statespace.core.statespace import PyMCStateSpace
      5 from pymc_extras.statespace.core.compile import compile_statespace
      7 __all__ = ["PytensorRepresentation", "PyMCStateSpace", "compile_statespace"]

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/core/statespace.py:23
     20 from rich.table import Table
     22 from pymc_extras.statespace.core.representation import PytensorRepresentation
---> 23 from pymc_extras.statespace.filters import (
     24     KalmanSmoother,
     25     SquareRootFilter,
     26     StandardFilter,
     27     UnivariateFilter,
     28 )
     29 from pymc_extras.statespace.filters.distributions import (
     30     LinearGaussianStateSpace,
     31     MvNormalSVD,
     32     SequenceMvNormal,
     33 )
     34 from pymc_extras.statespace.filters.utilities import stabilize

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/filters/__init__.py:1
----> 1 from pymc_extras.statespace.filters.distributions import LinearGaussianStateSpace
      2 from pymc_extras.statespace.filters.kalman_filter import (
      3     SquareRootFilter,
      4     StandardFilter,
      5     UnivariateFilter,
      6 )
      7 from pymc_extras.statespace.filters.kalman_smoother import KalmanSmoother

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/filters/distributions.py:59
     55     dtype = "floatX"
     56     _print_name = ("MultivariateNormal", "\\operatorname{MultivariateNormal}")
---> 59 class MvNormalSVD(MvNormal):
     60     """Dummy distribution intended to be rewritten into a JAX multivariate_normal with method="svd".
     61 
     62     A JAX MvNormal robust to low-rank covariance matrices
     63     """
     65     rv_op = MvNormalSVDRV()

File ~/projects/pymc-devs/pymc-extras/pymc_extras/statespace/filters/distributions.py:65, in MvNormalSVD()
     59 class MvNormalSVD(MvNormal):
     60     """Dummy distribution intended to be rewritten into a JAX multivariate_normal with method="svd".
     61 
     62     A JAX MvNormal robust to low-rank covariance matrices
     63     """
---> 65     rv_op = MvNormalSVDRV()

TypeError: MvNormalRV.__init__() missing 1 required keyword-only argument: 'method'

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