Skip to content

CI error: Mypy errors #6938

Closed
Closed
@twiecki

Description

@twiecki

Description

CI currently breaks on numpy: https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951

Full output:

[pymc/data.py]
pymc/data.py:237: error: Self? has no attribute "to_numpy"


[pymc/distributions/continuous.py]
pymc/distributions/continuous.py:157: error: Dispatch type "PositiveContinuous" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:162: error: Dispatch type "UnitContinuous" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:167: error: Dispatch type "CircularContinuous" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:172: error: Dispatch type "BoundedContinuous" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:306: error: Incompatible types in assignment (expression has type "Tuple[int, int]", base class "BoundedContinuous" defined the type as "Optional[List[int]]")
pymc/distributions/continuous.py:358: error: Dispatch type "Uniform" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:562: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:562: note:      Superclass:
pymc/distributions/continuous.py:562: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:562: note:      Subclass:
pymc/distributions/continuous.py:562: note:          @classmethod
pymc/distributions/continuous.py:562: note:          def rng_fn(cls, rng: RandomState, mu: Union[ndarray[Any, Any], float], sigma: Union[ndarray[Any, Any], float], lower: Union[ndarray[Any, Any], float], upper: Union[ndarray[Any, Any], float], size: Union[List[int], int, None]) -> ndarray[Any, Any]
pymc/distributions/continuous.py:662: error: Incompatible types in assignment (expression has type "Tuple[int, int]", base class "BoundedContinuous" defined the type as "Optional[List[int]]")
pymc/distributions/continuous.py:665: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/continuous.py:665: note:      Superclass:
pymc/distributions/continuous.py:665: note:          @classmethod
pymc/distributions/continuous.py:665: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/continuous.py:665: note:      Subclass:
pymc/distributions/continuous.py:665: note:          @classmethod
pymc/distributions/continuous.py:665: note:          def dist(cls, mu: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., sigma: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., *, tau: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., lower: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., upper: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., **kwargs: Any) -> RandomVariable
pymc/distributions/continuous.py:676: error: Argument 1 to "as_tensor_variable" has incompatible type "Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None]"; expected "Union[Variable[Any, Any], Sequence[Variable[Any, Any]], Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]]"
pymc/distributions/continuous.py:677: error: Argument 1 to "as_tensor_variable" has incompatible type "Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None]"; expected "Union[Variable[Any, Any], Sequence[Variable[Any, Any]], Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]]"
pymc/distributions/continuous.py:682: error: Incompatible return value type (got "TensorVariable[Any, Any]", expected "RandomVariable")
pymc/distributions/continuous.py:747: error: Dispatch type "TruncatedNormal" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:820: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/continuous.py:820: note:      Superclass:
pymc/distributions/continuous.py:820: note:          @classmethod
pymc/distributions/continuous.py:820: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/continuous.py:820: note:      Subclass:
pymc/distributions/continuous.py:820: note:          @classmethod
pymc/distributions/continuous.py:820: note:          def dist(cls, sigma: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., tau: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., *args: Any, **kwargs: Any) -> Any
pymc/distributions/continuous.py:874: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:874: note:      Superclass:
pymc/distributions/continuous.py:874: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:874: note:      Subclass:
pymc/distributions/continuous.py:874: note:          @classmethod
pymc/distributions/continuous.py:874: note:          def rng_fn(cls, rng: Any, mu: Any, lam: Any, alpha: Any, size: Any) -> ndarray[Any, Any]
pymc/distributions/continuous.py:963: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/continuous.py:963: note:      Superclass:
pymc/distributions/continuous.py:963: note:          @classmethod
pymc/distributions/continuous.py:963: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/continuous.py:963: note:      Subclass:
pymc/distributions/continuous.py:963: note:          @classmethod
pymc/distributions/continuous.py:963: note:          def dist(cls, mu: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., lam: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., phi: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., alpha: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., **kwargs: Any) -> Any
pymc/distributions/continuous.py:1053: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:1053: note:      Superclass:
pymc/distributions/continuous.py:1053: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:1053: note:      Subclass:
pymc/distributions/continuous.py:1053: note:          @classmethod
pymc/distributions/continuous.py:1053: note:          def rng_fn(cls, rng: Any, alpha: Any, beta: Any, size: Any) -> ndarray[Any, Any]
pymc/distributions/continuous.py:1137: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/continuous.py:1137: note:      Superclass:
pymc/distributions/continuous.py:1137: note:          @classmethod
pymc/distributions/continuous.py:1137: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/continuous.py:1137: note:      Subclass:
pymc/distributions/continuous.py:1137: note:          @classmethod
pymc/distributions/continuous.py:1137: note:          def dist(cls, alpha: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., beta: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., mu: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., sigma: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., nu: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any], None] = ..., *args: Any, **kwargs: Any) -> Any
pymc/distributions/continuous.py:[12](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:13)20: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:1220: note:      Superclass:
pymc/distributions/continuous.py:1220: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:1220: note:      Subclass:
pymc/distributions/continuous.py:1220: note:          @classmethod
pymc/distributions/continuous.py:1220: note:          def rng_fn(cls, rng: Any, a: Any, b: Any, size: Any) -> ndarray[Any, Any]
pymc/distributions/continuous.py:1274: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/continuous.py:1274: note:      Superclass:
pymc/distributions/continuous.py:1274: note:          @classmethod
pymc/distributions/continuous.py:1274: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/continuous.py:1274: note:      Subclass:
pymc/distributions/continuous.py:1274: note:          @classmethod
pymc/distributions/continuous.py:1274: note:          def dist(cls, a: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any]], b: Union[ndarray[Any, Any], int, float, TensorVariable[Any, Any]], *args: Any, **kwargs: Any) -> Any
pymc/distributions/continuous.py:1514: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:1514: note:      Superclass:
pymc/distributions/continuous.py:1514: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:1514: note:      Subclass:
pymc/distributions/continuous.py:1514: note:          @classmethod
pymc/distributions/continuous.py:1514: note:          def rng_fn(cls, rng: Any, b: Any, kappa: Any, mu: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:1746: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:1746: note:      Superclass:
pymc/distributions/continuous.py:1746: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:1746: note:      Subclass:
pymc/distributions/continuous.py:1746: note:          @classmethod
pymc/distributions/continuous.py:1746: note:          def rng_fn(cls, rng: Any, nu: Any, mu: Any, sigma: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:1914: error: Incompatible types in assignment (expression has type "Tuple[int, None]", base class "BoundedContinuous" defined the type as "Optional[List[int]]")
pymc/distributions/continuous.py:1971: error: Dispatch type "Pareto" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:2450: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:2450: note:      Superclass:
pymc/distributions/continuous.py:2450: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:2450: note:      Subclass:
pymc/distributions/continuous.py:2450: note:          @classmethod
pymc/distributions/continuous.py:2450: note:          def rng_fn(cls, rng: Any, alpha: Any, beta: Any, size: Any) -> ndarray[Any, Any]
pymc/distributions/continuous.py:2568: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:2568: note:      Superclass:
pymc/distributions/continuous.py:2568: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:2568: note:      Subclass:
pymc/distributions/continuous.py:2568: note:          @classmethod
pymc/distributions/continuous.py:2568: note:          def rng_fn(cls, rng: Any, nu: Any, sigma: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:2680: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:2680: note:      Superclass:
pymc/distributions/continuous.py:2680: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:2680: note:      Subclass:
pymc/distributions/continuous.py:2680: note:          @classmethod
pymc/distributions/continuous.py:2680: note:          def rng_fn(cls, rng: Any, mu: Any, sigma: Any, nu: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:2890: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:2890: note:      Superclass:
pymc/distributions/continuous.py:2890: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:2890: note:      Subclass:
pymc/distributions/continuous.py:2890: note:          @classmethod
pymc/distributions/continuous.py:2890: note:          def rng_fn(cls, rng: Any, mu: Any, sigma: Any, alpha: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:3050: error: Incompatible types in assignment (expression has type "Tuple[int, int]", base class "BoundedContinuous" defined the type as "Optional[List[int]]")
pymc/distributions/continuous.py:3118: error: Dispatch type "Triangular" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:3226: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:3226: note:      Superclass:
pymc/distributions/continuous.py:3226: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:3226: note:      Subclass:
pymc/distributions/continuous.py:3226: note:          @classmethod
pymc/distributions/continuous.py:3226: note:          def rng_fn(cls, rng: Any, b: Any, sigma: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:3443: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:3443: note:      Superclass:
pymc/distributions/continuous.py:3443: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:3443: note:      Subclass:
pymc/distributions/continuous.py:3443: note:          @classmethod
pymc/distributions/continuous.py:3443: note:          def rng_fn(cls, rng: Any, mu: Any, sigma: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:3562: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:3562: note:      Superclass:
pymc/distributions/continuous.py:3562: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:3562: note:      Subclass:
pymc/distributions/continuous.py:3562: note:          @classmethod
pymc/distributions/continuous.py:3562: note:          def rng_fn(cls, rng: Any, x: Any, pdf: Any, cdf: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:3668: error: Dispatch type "Interpolated" must be subtype of fallback function first argument "Op"
pymc/distributions/continuous.py:3684: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:3684: note:      Superclass:
pymc/distributions/continuous.py:3684: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:3684: note:      Subclass:
pymc/distributions/continuous.py:3684: note:          @classmethod
pymc/distributions/continuous.py:3684: note:          def rng_fn(cls, rng: Any, mu: Any, sigma: Any, size: Any = ...) -> ndarray[Any, Any]
pymc/distributions/continuous.py:3796: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/continuous.py:3796: note:      Superclass:
pymc/distributions/continuous.py:3796: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/continuous.py:3796: note:      Subclass:
pymc/distributions/continuous.py:3796: note:          @classmethod
pymc/distributions/continuous.py:3796: note:          def rng_fn(cls, rng: Any, h: Any, z: Any, size: Any = ...) -> ndarray[Any, Any]


[pymc/distributions/dist_math.py]
pymc/distributions/dist_math.py:288: error: Cannot instantiate abstract class "I1e" with abstract attribute "c_code"
pymc/distributions/dist_math.py:308: error: Cannot instantiate abstract class "I0e" with abstract attribute "c_code"


[pymc/distributions/distribution.py]
pymc/distributions/distribution.py:191: error: Incompatible types in assignment (expression has type "None", variable has type "int")
pymc/distributions/distribution.py:225: error: Bracketed expression "[...]" is not valid as a type
pymc/distributions/distribution.py:225: note: Did you mean "List[...]"?
pymc/distributions/distribution.py:226: error: Incompatible types in assignment (expression has type "None", variable has type "MetaType")
pymc/distributions/distribution.py:228: error: Incompatible return type for "__new__" (returns "TensorVariable[Any, Any]", but must return a subtype of "Distribution")
pymc/distributions/distribution.py:316: error: "None" has no attribute "register_rv"
pymc/distributions/distribution.py:327: error: "TensorVariable[Any, Any]" has no attribute "str_repr"
pymc/distributions/distribution.py:328: error: "TensorVariable[Any, Any]" has no attribute "_repr_latex_"
pymc/distributions/distribution.py:332: error: "TensorVariable[Any, Any]" has no attribute "logp"
pymc/distributions/distribution.py:333: error: "TensorVariable[Any, Any]" has no attribute "logcdf"
pymc/distributions/distribution.py:334: error: "TensorVariable[Any, Any]" has no attribute "random"
pymc/distributions/distribution.py:385: error: Argument 1 to "convert_shape" has incompatible type "Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None]"; expected "Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]]]"
pymc/distributions/distribution.py:496: error: Incompatible types in assignment (expression has type "List[TensorVariable[Any, Any]]", variable has type "Tuple[Any, ...]")
pymc/distributions/distribution.py:590: error: "Node" has no attribute "op"
pymc/distributions/distribution.py:600: error: "Node" has no attribute "inputs"
pymc/distributions/distribution.py:600: error: "Node" has no attribute "outputs"
pymc/distributions/distribution.py:608: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/distribution.py:608: note:      Superclass:
pymc/distributions/distribution.py:608: note:          @classmethod
pymc/distributions/distribution.py:608: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/distribution.py:608: note:      Subclass:
pymc/distributions/distribution.py:608: note:          @classmethod
pymc/distributions/distribution.py:608: note:          def dist(cls, *dist_params: Any, dist: Callable[..., Any], logp: Optional[Callable[..., Any]] = ..., logcdf: Optional[Callable[..., Any]] = ..., moment: Optional[Callable[..., Any]] = ..., ndim_supp: int = ..., dtype: str = ..., class_name: str = ..., **kwargs: Any) -> Any
pymc/distributions/distribution.py:620: error: Incompatible types in assignment (expression has type "List[TensorVariable[Any, Any]]", variable has type "Tuple[Any, ...]")
pymc/distributions/distribution.py:1273: error: Incompatible return value type (got "Tuple[Tuple[Any, Union[ndarray[Any, dtype[bool_]], Any]], Tuple[Any, Union[ndarray[Any, Any], TensorVariable[Any, Any]]], Any]", expected "Tuple[Tuple[TensorVariable[Any, Any], TensorVariable[Any, Any]], Tuple[TensorVariable[Any, Any], TensorVariable[Any, Any]], TensorVariable[Any, Any]]")


[pymc/distributions/mixture.py]
pymc/distributions/mixture.py:66: error: "Node" has no attribute "inputs"
pymc/distributions/mixture.py:66: error: "Node" has no attribute "outputs"


[pymc/distributions/multivariate.py]
pymc/distributions/multivariate.py:106: error: Dispatch type "SimplexContinuous" must be subtype of fallback function first argument "Op"
pymc/distributions/multivariate.py:1645: error: Dispatch type "LKJCorr" must be subtype of fallback function first argument "Op"
pymc/distributions/multivariate.py:2107: error: Signature of "rng_fn" incompatible with supertype "RandomVariable"
pymc/distributions/multivariate.py:2107: note:      Superclass:
pymc/distributions/multivariate.py:2107: note:          def rng_fn(self, rng: Any, *args: Any, **kwargs: Any) -> Union[int, float, ndarray[Any, Any]]
pymc/distributions/multivariate.py:2107: note:      Subclass:
pymc/distributions/multivariate.py:2107: note:          @classmethod
pymc/distributions/multivariate.py:2107: note:          def rng_fn(cls, rng: RandomState, mu: Any, W: Any, alpha: Any, tau: Any, size: Any) -> Any


[pymc/distributions/timeseries.py]
pymc/distributions/timeseries.py:87: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/timeseries.py:87: note:      Superclass:
pymc/distributions/timeseries.py:87: note:          @classmethod
pymc/distributions/timeseries.py:87: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/timeseries.py:87: note:      Subclass:
pymc/distributions/timeseries.py:87: note:          @classmethod
pymc/distributions/timeseries.py:87: note:          def dist(cls, init_dist: Any, innovation_dist: Any, steps: Any = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/timeseries.py:433: error: "Node" has no attribute "inputs"
pymc/distributions/timeseries.py:433: error: "Node" has no attribute "outputs"
pymc/distributions/timeseries.py:727: error: "Node" has no attribute "inputs"
pymc/distributions/timeseries.py:727: error: "Node" has no attribute "outputs"
pymc/distributions/timeseries.py:894: error: "Node" has no attribute "inputs"
pymc/distributions/timeseries.py:894: error: "Node" has no attribute "outputs"


[pymc/distributions/truncated.py]
pymc/distributions/truncated.py:64: error: "Node" has no attribute "inputs"
pymc/distributions/truncated.py:64: error: "Node" has no attribute "outputs"
pymc/distributions/truncated.py:140: error: Signature of "dist" incompatible with supertype "Distribution"
pymc/distributions/truncated.py:140: note:      Superclass:
pymc/distributions/truncated.py:140: note:          @classmethod
pymc/distributions/truncated.py:140: note:          def dist(cls, dist_params: Any, *, shape: Union[int, TensorVariable[Any, Any], Sequence[Union[int, Variable[Any, Any]]], None] = ..., **kwargs: Any) -> TensorVariable[Any, Any]
pymc/distributions/truncated.py:140: note:      Subclass:
pymc/distributions/truncated.py:140: note:          @classmethod
pymc/distributions/truncated.py:140: note:          def dist(cls, dist: Any, lower: Any = ..., upper: Any = ..., max_n_steps: int = ..., **kwargs: Any) -> Any


[pymc/initial_point.py]
pymc/initial_point.py:151: error: Incompatible types in assignment (expression has type "Sequence[TensorVariable[Any, Any]]", variable has type "List[TensorVariable[Any, Any]]")
pymc/initial_point.py:262: error: Incompatible types in assignment (expression has type "Union[TensorVariable[Any, Any], Tuple[TensorVariable[Any, Any], ...]]", variable has type "TensorVariable[Any, Any]")
pymc/initial_point.py:287: error: Incompatible return value type (got "List[Variable[Any, Any]]", expected "List[TensorVariable[Any, Any]]")
pymc/initial_point.py:291: error: Incompatible return value type (got "List[Variable[Any, Any]]", expected "List[TensorVariable[Any, Any]]")


[pymc/logprob/basic.py]
pymc/logprob/basic.py:212: error: "FunctionGraph" has no attribute "preserve_rv_mappings"
pymc/logprob/basic.py:477: error: Incompatible types in assignment (expression has type "Dict[Variable[Any, Any], Variable[Any, Any]]", variable has type "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]")
pymc/logprob/basic.py:477: error: Argument 1 to "construct_ir_fgraph" has incompatible type "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"; expected "Dict[Variable[Any, Any], Variable[Any, Any]]"
pymc/logprob/basic.py:480: error: Item "NodeRewriter" of "Union[GraphRewriter, NodeRewriter]" has no attribute "rewrite"
pymc/logprob/basic.py:482: error: "FunctionGraph" has no attribute "preserve_rv_mappings"
pymc/logprob/basic.py:542: error: Argument 1 to "_logprob" has incompatible type "MeasurableVariable"; expected "Op"


[pymc/logprob/binary.py]
pymc/logprob/binary.py:49: error: "Node" has no attribute "inputs"
pymc/logprob/binary.py:56: error: "Node" has no attribute "inputs"
pymc/logprob/binary.py:59: error: "Node" has no attribute "outputs"
pymc/logprob/binary.py:64: error: "Node" has no attribute "inputs"
pymc/logprob/binary.py:67: error: Argument 1 to "check_potential_measurability" has incompatible type "List[Any]"; expected "Tuple[TensorVariable[Any, Any]]"
pymc/logprob/binary.py:70: error: "Node" has no attribute "op"
pymc/logprob/binary.py:141: error: "Node" has no attribute "inputs"
pymc/logprob/binary.py:144: error: Exception must be derived from BaseException
pymc/logprob/binary.py:149: error: "Node" has no attribute "op"


[pymc/logprob/censoring.py]
pymc/logprob/censoring.py:72: error: "Node" has no attribute "inputs"
pymc/logprob/censoring.py:75: error: "Node" has no attribute "inputs"
pymc/logprob/censoring.py:165: error: "Node" has no attribute "inputs"
pymc/logprob/censoring.py:168: error: "Node" has no attribute "inputs"
pymc/logprob/censoring.py:169: error: "Node" has no attribute "op"
pymc/logprob/censoring.py:171: error: "Node" has no attribute "outputs"


[pymc/logprob/mixture.py]
pymc/logprob/mixture.py:142: error: Argument 1 has incompatible type "Union[Variable[Any, Any], slice, None]"; expected "Union[Variable[Any, Any], Sequence[Variable[Any, Any]], Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]]"
pymc/logprob/mixture.py:168: error: Incompatible types in assignment (expression has type "Union[int, slice, None]", variable has type "Union[Variable[Any, Any], slice, None]")
pymc/logprob/mixture.py:169: error: Argument 1 to "get_canonical_form_slice" has incompatible type "Union[Variable[Any, Any], slice, None]"; expected "Union[slice, Variable[Any, Any]]"
pymc/logprob/mixture.py:170: error: "Variable[Any, Any]" has no attribute "start"
pymc/logprob/mixture.py:170: error: "Variable[Any, Any]" has no attribute "stop"
pymc/logprob/mixture.py:170: error: "Variable[Any, Any]" has no attribute "step"
pymc/logprob/mixture.py:176: error: Value of type "Union[Variable[Any, Any], slice, None]" is not indexable
pymc/logprob/mixture.py:193: error: Value of type "Union[Variable[Any, Any], slice, None]" is not indexable
pymc/logprob/mixture.py:216: error: Incompatible return value type (got "Variable[Any, Any]", expected "TensorVariable[Any, Any]")
pymc/logprob/mixture.py:263: error: Incompatible types in assignment (expression has type "ndarray[Any, Any]", variable has type "Constant[NoneTypeT]")
pymc/logprob/mixture.py:263: error: Argument 1 to "constant_fold" has incompatible type "Tuple[Constant[NoneTypeT]]"; expected "Sequence[TensorVariable[Any, Any]]"
pymc/logprob/mixture.py:264: error: Incompatible types in assignment (expression has type "TensorVariable[Any, Any]", variable has type "Constant[NoneTypeT]")
pymc/logprob/mixture.py:268: error: Incompatible return value type (got "Tuple[Any, Constant[NoneTypeT]]", expected "Tuple[Optional[List[TensorVariable[Any, Any]]], Optional[int]]")
pymc/logprob/mixture.py:281: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/mixture.py:340: error: Argument 1 to "len" has incompatible type "TensorVariable[Any, Any]"; expected "Sized"
pymc/logprob/mixture.py:342: error: Argument 1 to "len" has incompatible type "TensorVariable[Any, Any]"; expected "Sized"
pymc/logprob/mixture.py:351: error: Incompatible types in assignment (expression has type "List[Any]", variable has type "TensorVariable[Any, Any]")
pymc/logprob/mixture.py:352: error: Argument 1 to "len" has incompatible type "TensorVariable[Any, Any]"; expected "Sized"
pymc/logprob/mixture.py:357: error: Argument 1 to "constant_fold" has incompatible type "Tuple[Variable[Any, Any]]"; expected "Sequence[TensorVariable[Any, Any]]"
pymc/logprob/mixture.py:358: error: Incompatible types in assignment (expression has type "Tuple[Variable[Any, Any], ...]", variable has type "Tuple[int]")
pymc/logprob/mixture.py:360: error: Argument 1 to "expand_indices" has incompatible type "TensorVariable[Any, Any]"; expected "Tuple[Union[Variable[Any, Any], slice, None], ...]"
pymc/logprob/mixture.py:360: error: Argument 2 to "expand_indices" has incompatible type "Tuple[int]"; expected "Tuple[TensorVariable[Any, Any]]"
pymc/logprob/mixture.py:388: error: Incompatible types in assignment (expression has type "Optional[Any]", variable has type "int")
pymc/logprob/mixture.py:388: error: "Variable[Any, Any]" has no attribute "data"
pymc/logprob/mixture.py:391: error: Argument "axis" to "expand_dims" has incompatible type "int"; expected "Tuple[int, ...]"
pymc/logprob/mixture.py:416: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/mixture.py:507: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]


[pymc/logprob/order.py]
pymc/logprob/order.py:75: error: "Node" has no attribute "op"
pymc/logprob/order.py:78: error: "Node" has no attribute "inputs"
pymc/logprob/order.py:83: error: "Node" has no attribute "inputs"
pymc/logprob/order.py:100: error: "Node" has no attribute "op"
pymc/logprob/order.py:149: error: "Node" has no attribute "op"
pymc/logprob/order.py:152: error: "Node" has no attribute "inputs"
pymc/logprob/order.py:157: error: "Node" has no attribute "inputs"
pymc/logprob/order.py:191: error: "Node" has no attribute "op"


[pymc/logprob/rewriting.py]
pymc/logprob/rewriting.py:102: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/rewriting.py:281: error: Argument 1 to "add" of "set" has incompatible type "Variable[Any, Any]"; expected "TensorVariable[Any, Any]"
pymc/logprob/rewriting.py:334: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/rewriting.py:460: error: Argument 1 to "PreserveRVMappings" has incompatible type "Dict[Variable[Any, Any], Variable[Any, Any]]"; expected "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"
pymc/logprob/rewriting.py:504: error: Incompatible return value type (got "List[Variable[Any, Any]]", expected "Sequence[TensorVariable[Any, Any]]")


[pymc/logprob/scan.py]
pymc/logprob/scan.py:145: error: Item "None" of "Optional[FieldInfo]" has no attribute "index"
pymc/logprob/scan.py:162: error: Item "None" of "Optional[FieldInfo]" has no attribute "name"
pymc/logprob/scan.py:172: error: Item "None" of "Optional[FieldInfo]" has no attribute "name"
pymc/logprob/scan.py:191: error: Item "None" of "Optional[FieldInfo]" has no attribute "name"
pymc/logprob/scan.py:197: error: Item "None" of "Optional[FieldInfo]" has no attribute "name"
pymc/logprob/scan.py:204: error: Incompatible types in assignment (expression has type "List[Any]", variable has type "Tuple[Any, ...]")
pymc/logprob/scan.py:221: error: Value of type "Variable[Any, Any]" is not indexable
pymc/logprob/scan.py:245: error: Argument 1 has incompatible type "Dict[Variable[Any, Any], Any]"; expected "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"
pymc/logprob/scan.py:257: error: Argument "rvs_to_values" to "replace_rvs_by_values" has incompatible type "Dict[Variable[Any, Any], Any]"; expected "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"
pymc/logprob/scan.py:287: error: Item "None" of "Optional[FieldInfo]" has no attribute "name"
pymc/logprob/scan.py:289: error: Item "None" of "Optional[FieldInfo]" has no attribute "index"
pymc/logprob/scan.py:314: error: Incompatible return value type (got "dict_values[TensorVariable[Any, Any], TensorVariable[Any, Any]]", expected "TensorVariable[Any, Any]")
pymc/logprob/scan.py:367: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/scan.py:397: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]


[pymc/logprob/tensor.py]
pymc/logprob/tensor.py:90: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/tensor.py:221: error: Argument 1 to "check_potential_measurability" has incompatible type "List[Any]"; expected "Tuple[TensorVariable[Any, Any]]"
pymc/logprob/tensor.py:224: error: Argument 1 to "assume_measured_ir_outputs" has incompatible type "dict_keys[TensorVariable[Any, Any], TensorVariable[Any, Any]]"; expected "Sequence[TensorVariable[Any, Any]]"
pymc/logprob/tensor.py:233: error: List item 0 has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "Union[MeasurableMakeVector, MeasurableJoin]"
pymc/logprob/tensor.py:254: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/logprob/tensor.py:307: error: List item 0 has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "MeasurableDimShuffle"


[pymc/logprob/transforms.py]
pymc/logprob/transforms.py:[13](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:14)8: error: Signature of "make_node" incompatible with supertype "Op"
pymc/logprob/transforms.py:138: note:      Superclass:
pymc/logprob/transforms.py:138: note:          def make_node(self, *inputs: Variable[Any, Any]) -> Apply[Any]
pymc/logprob/transforms.py:138: note:      Subclass:
pymc/logprob/transforms.py:138: note:          def make_node(self, tran_value: TensorVariable[Any, Any], value: TensorVariable[Any, Any]) -> Any
pymc/logprob/transforms.py:226: error: "Node" has no attribute "outputs"
pymc/logprob/transforms.py:236: error: "TransformValuesMapping" has no attribute "get"
pymc/logprob/transforms.py:241: error: "Node" has no attribute "op"
pymc/logprob/transforms.py:243: error: "Node" has no attribute "clone"
pymc/logprob/transforms.py:250: error: "Node" has no attribute "outputs"
pymc/logprob/transforms.py:260: error: Item "List[Variable[Any, Any]]" of "Union[Variable[Any, Any], List[Variable[Any, Any]]]" has no attribute "name"
pymc/logprob/transforms.py:262: error: Argument 2 to "update_rv_maps" of "PreserveRVMappings" has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "TensorVariable[Any, Any]"
pymc/logprob/transforms.py:287: error: "Node" has no attribute "outputs"
pymc/logprob/transforms.py:298: error: "TransformValuesMapping" has no attribute "get"
pymc/logprob/transforms.py:305: error: "Node" has no attribute "op"
pymc/logprob/transforms.py:306: error: "Node" has no attribute "clone"
pymc/logprob/transforms.py:313: error: "Node" has no attribute "outputs"
pymc/logprob/transforms.py:333: error: Argument "replace" to "clone_replace" has incompatible type "Dict[TensorVariable[Any, Any], Any]"; expected "Union[Iterable[Tuple[Variable[Any, Any], Variable[Any, Any]]], Dict[Variable[Any, Any], Variable[Any, Any]], None]"
pymc/logprob/transforms.py:342: error: Item "List[Variable[Any, Any]]" of "Union[Variable[Any, Any], List[Variable[Any, Any]]]" has no attribute "name"
pymc/logprob/transforms.py:344: error: Argument 2 to "update_rv_maps" of "PreserveRVMappings" has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "TensorVariable[Any, Any]"
pymc/logprob/transforms.py:493: error: "RVTransform" has no attribute "power"
pymc/logprob/transforms.py:524: error: "RVTransform" has no attribute "power"
pymc/logprob/transforms.py:643: error: "Node" has no attribute "op"
pymc/logprob/transforms.py:651: error: "Node" has no attribute "inputs"
pymc/logprob/transforms.py:664: error: "Node" has no attribute "inputs"
pymc/logprob/transforms.py:666: error: Argument 1 to "check_potential_measurability" has incompatible type "Tuple[Any, ...]"; expected "Tuple[TensorVariable[Any, Any]]"
pymc/logprob/transforms.py:669: error: "Node" has no attribute "op"
pymc/logprob/transforms.py:671: error: Incompatible types in assignment (expression has type "Tuple[Variable[Any, Any]]", variable has type "Tuple[TensorVariable[Any, Any], ...]")
pymc/logprob/transforms.py:688: error: Argument 2 to "get" of "dict" has incompatible type "None"; expected "RVTransform"
pymc/logprob/transforms.py:699: error: Incompatible types in assignment (expression has type "Tuple[Variable[Any, Any], Any]", variable has type "Tuple[TensorVariable[Any, Any], ...]")
pymc/logprob/transforms.py:702: error: Incompatible types in assignment (expression has type "Tuple[Variable[Any, Any], Any]", variable has type "Tuple[TensorVariable[Any, Any], ...]")
pymc/logprob/transforms.py:783: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:794: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:813: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:824: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:835: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:846: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:857: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:868: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")
pymc/logprob/transforms.py:879: error: Incompatible types in assignment (expression has type "int", base class "RVTransform" defined the type as "None")


[pymc/logprob/utils.py]
pymc/logprob/utils.py:106: error: Incompatible types in "yield from" (actual type "Union[TensorVariable[Any, Any], Tuple[Any, Optional[Iterable[Any]]]]", expected type "TensorVariable[Any, Any]")
pymc/logprob/utils.py:[14](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:15)8: error: Incompatible types in assignment (expression has type "Dict[Union[Apply[Any], Variable[Any, Any], Op], Union[Apply[Any], Variable[Any, Any], Op]]", variable has type "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]")
pymc/logprob/utils.py:148: error: Argument 2 to "clone_get_equiv" has incompatible type "Iterable[TensorVariable[Any, Any]]"; expected "Sequence[Variable[Any, Any]]"
pymc/logprob/utils.py:148: error: Argument 5 to "clone_get_equiv" has incompatible type "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"; expected "Optional[Dict[Union[Apply[Any], Variable[Any, Any], Op], Union[Apply[Any], Variable[Any, Any], Op]]]"
pymc/logprob/utils.py:[15](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:16)1: error: Invalid index type "Variable[Any, Any]" for "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"; expected type "TensorVariable[Any, Any]"
pymc/logprob/utils.py:158: error: Argument 1 to "list" has incompatible type "List[Variable[Any, Any]]"; expected "Iterable[TensorVariable[Any, Any]]"
pymc/logprob/utils.py:[16](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:17)0: error: Incompatible return value type (got "Tuple[Iterable[TensorVariable[Any, Any]], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]", expected "Tuple[TensorVariable[Any, Any], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]")
pymc/logprob/utils.py:222: error: No overload variant of "set" matches argument type "Container[TensorVariable[Any, Any]]"
pymc/logprob/utils.py:222: note: Possible overload variants:
pymc/logprob/utils.py:222: note:     def [_T] __init__(self) -> Set[_T]
pymc/logprob/utils.py:222: note:     def [_T] __init__(self, Iterable[_T], /) -> Set[_T]
pymc/logprob/utils.py:244: error: Incompatible types in assignment (expression has type "Tuple[str, str, str]", base class "CheckAndRaise" defined the type as "Tuple[str, str]")
pymc/logprob/utils.py:310: error: Set comprehension has incompatible type Set[Union[Any, Tuple[Any, Optional[Iterable[Any]]]]]; expected Set[Variable[Any, Any]]
pymc/logprob/utils.py:312: error: Item "Tuple[Any, ...]" of "Union[Any, Tuple[Any, Optional[Iterable[Any]]]]" has no attribute "owner"


[pymc/model/core.py]
pymc/model/core.py:221: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
pymc/model/core.py:486: error: Variable "typing_extensions.Self" is not valid as a type
pymc/model/core.py:486: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
pymc/model/core.py:695: error: List item 0 has incompatible type "Union[Variable[Any, Any], Sequence[Variable[Any, Any]]]"; expected "TensorVariable[Any, Any]"
pymc/model/core.py:735: error: No overload variant of "__setitem__" of "list" matches argument types "int", "TensorVariable[Any, Any]"
pymc/model/core.py:735: note: Possible overload variants:
pymc/model/core.py:735: note:     def __setitem__(self, SupportsIndex, None, /) -> None
pymc/model/core.py:735: note:     def __setitem__(self, slice, Iterable[None], /) -> None
pymc/model/core.py:738: error: Incompatible return value type (got "List[None]", expected "Union[Variable[Any, Any], List[Variable[Any, Any]]]")
pymc/model/core.py:770: error: List item 0 has incompatible type "Union[Variable[Any, Any], Sequence[Variable[Any, Any]]]"; expected "Variable[Any, Any]"
pymc/model/core.py:809: error: List item 0 has incompatible type "Union[Variable[Any, Any], Sequence[Variable[Any, Any]]]"; expected "Variable[Any, Any]"
pymc/model/core.py:829: error: Unsupported left operand type for + ("Variable[Any, Any]")
pymc/model/core.py:835: error: Incompatible return value type (got "Union[Variable[Any, Any], List[Variable[Any, Any]]]", expected "Variable[Any, Any]")
pymc/model/core.py:841: error: Incompatible return value type (got "Union[Variable[Any, Any], List[Variable[Any, Any]]]", expected "Variable[Any, Any]")
pymc/model/core.py:846: error: Incompatible return value type (got "Union[Variable[Any, Any], List[Variable[Any, Any]]]", expected "Variable[Any, Any]")
pymc/model/core.py:10[17](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:18): error: Argument 1 to "array_equal" has incompatible type "Optional[Tuple[Any, ...]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"
pymc/model/core.py:1017: error: Argument 2 to "array_equal" has incompatible type "Optional[Tuple[Any, ...]]"; expected "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"
pymc/model/core.py:1024: error: Argument 1 to "len" has incompatible type "Optional[Tuple[Any, ...]]"; expected "Sized"
pymc/model/core.py:1074: error: "Variable[Any, Any]" has no attribute "set_value"
pymc/model/core.py:1149: error: Item "Sequence[Any]" of "Union[Sequence[Any], ndarray[Any, Any]]" has no attribute "ndim"
pymc/model/core.py:1149: error: "SharedVariable" has no attribute "ndim"
pymc/model/core.py:1151: error: "SharedVariable" has no attribute "ndim"
pymc/model/core.py:1157: error: Item "Sequence[Any]" of "Union[Sequence[Any], ndarray[Any, Any]]" has no attribute "shape"
pymc/model/core.py:1377: error: No overload variant of "__getitem__" of "memoryview" matches argument type "TensorVariable[Any, Any]"
pymc/model/core.py:1377: note: Possible overload variants:
pymc/model/core.py:1377: note:     def __getitem__(self, SupportsIndex, /) -> int
pymc/model/core.py:1377: note:     def __getitem__(self, slice, /) -> memoryview
pymc/model/core.py:1396: error: Incompatible types in assignment (expression has type "TensorVariable[Any, Any]", variable has type "ndarray[Any, Any]")
pymc/model/core.py:1405: error: Argument "value_var" to "create_value_var" of "Model" has incompatible type "ndarray[Any, Any]"; expected "Optional[Variable[Any, Any]]"
pymc/model/core.py:1459: error: Incompatible return value type (got "Union[Variable[Any, Any], Any]", expected "TensorVariable[Any, Any]")
pymc/model/core.py:[18](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:19)17: error: Value of type "Union[Variable[Any, Any], List[Variable[Any, Any]]]" is not indexable
pymc/model/core.py:2076: error: Incompatible types in assignment (expression has type "List[Any]", variable has type "Tuple[Any, ...]")
pymc/model/core.py:2286: error: "TensorVariable[Any, Any]" has no attribute "str_repr"
pymc/model/core.py:2289: error: "TensorVariable[Any, Any]" has no attribute "_repr_latex_"


[pymc/model/fgraph.py]
pymc/model/fgraph.py:[19](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:20)2: error: List comprehension has incompatible type List[SharedVariable]; expected List[Union[RandomStateSharedVariable, RandomGeneratorSharedVariable]]
pymc/model/fgraph.py:193: error: List comprehension has incompatible type List[SharedVariable]; expected List[Union[RandomStateSharedVariable, RandomGeneratorSharedVariable]]
pymc/model/fgraph.py:218: error: "FunctionGraph" has no attribute "_coords"
pymc/model/fgraph.py:219: error: "FunctionGraph" has no attribute "_dim_lengths"
pymc/model/fgraph.py:236: error: Incompatible types in assignment (expression has type "Variable[Any, Any]", variable has type "Union[RandomStateSharedVariable, RandomGeneratorSharedVariable]")
pymc/model/fgraph.py:260: error: Incompatible types in assignment (expression has type "Variable[Any, Any]", variable has type "Union[RandomStateSharedVariable, RandomGeneratorSharedVariable]")
pymc/model/fgraph.py:277: error: Incompatible return value type (got "Tuple[FunctionGraph, Dict[Union[RandomStateSharedVariable, RandomGeneratorSharedVariable], Any]]", expected "Tuple[FunctionGraph, Dict[Variable[Any, Any], Variable[Any, Any]]]")


[pymc/model/transform/basic.py]
pymc/model/transform/basic.py:58: error: Incompatible types in assignment (expression has type "Tuple[Union[Variable[Any, Any], Sequence[Union[Variable[Any, Any], str]]]]", variable has type "Union[Union[Variable[Any, Any], str], Sequence[Union[Variable[Any, Any], str]]]")
pymc/model/transform/basic.py:59: error: Item "Variable[Any, Any]" of "Union[Variable[Any, Any], Sequence[Union[Variable[Any, Any], str]], List[Any], Tuple[Any, ...]]" has no attribute "__iter__" (not iterable)


[pymc/model/transform/conditioning.py]
pymc/model/transform/conditioning.py:108: error: Invalid index type "Union[str, TensorVariable[Any, Any]]" for "Dict[Variable[Any, Any], Variable[Any, Any]]"; expected type "Variable[Any, Any]"
pymc/model/transform/conditioning.py:115: error: Item "str" of "Union[str, TensorVariable[Any, Any]]" has no attribute "name"
pymc/model/transform/conditioning.py:117: error: Item "str" of "Union[str, TensorVariable[Any, Any]]" has no attribute "type"
pymc/model/transform/conditioning.py:1[20](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:21): error: Argument 1 to "tuple" has incompatible type "dict_items[Variable[Any, Any], Union[Variable[Any, Any], List[Variable[Any, Any]]]]"; expected "Iterable[Tuple[Variable[Any, Any], Variable[Any, Any]]]"
pymc/model/transform/conditioning.py:137: error: Argument "replacement_fn" to "_replace_vars_in_graphs" has incompatible type "Callable[[Any, Any], Any]"; expected "Callable[[TensorVariable[Any, Any]], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]"
pymc/model/transform/conditioning.py:159: error: Item "Tuple[Any, ...]" of "Union[Variable[Any, Any], Tuple[Any, Optional[Iterable[Any]]]]" has no attribute "owner"
pymc/model/transform/conditioning.py:[21](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:22)4: error: Item "str" of "Union[str, TensorVariable[Any, Any]]" has no attribute "type"
pymc/model/transform/conditioning.py:231: error: Invalid index type "Union[str, TensorVariable[Any, Any]]" for "Dict[Variable[Any, Any], Variable[Any, Any]]"; expected type "Variable[Any, Any]"
pymc/model/transform/conditioning.py:256: error: Argument 1 to "tuple" has incompatible type "dict_items[Variable[Any, Any], Union[Variable[Any, Any], List[Variable[Any, Any]]]]"; expected "Iterable[Tuple[Variable[Any, Any], Variable[Any, Any]]]"
pymc/model/transform/conditioning.py:316: error: Invalid index type "Union[Variable[Any, Any], str]" for "Dict[Variable[Any, Any], Variable[Any, Any]]"; expected type "Variable[Any, Any]"


[pymc/model_graph.py]
pymc/model_graph.py:83: error: Item "Tuple[Any, ...]" of "Union[Any, Tuple[Any, Optional[Iterable[Any]]]]" has no attribute "name"
pymc/model_graph.py:116: error: Argument 1 to "VarName" has incompatible type "Optional[str]"; expected "str"


[pymc/printing.py]
pymc/printing.py:61: error: Item "None" of "Optional[str]" has no attribute "strip"
pymc/printing.py:161: error: "Variable[Any, Any]" has no attribute "str_repr"
pymc/printing.py:184: error: Argument 1 to "str_for_dist" has incompatible type "Variable[Any, Any]"; expected "TensorVariable[Any, Any]"
pymc/printing.py:[22](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:23)2: error: Item "Tuple[Any, ...]" of "Union[Any, Tuple[Any, Optional[Iterable[Any]]]]" has no attribute "owner"
pymc/printing.py:224: error: Item "Tuple[Any, ...]" of "Union[Any, Tuple[Any, Optional[Iterable[Any]]]]" has no attribute "name"
pymc/printing.py:255: error: Item "TensorVariable[Any, Any]" of "Union[TensorVariable[Any, Any], Model]" has no attribute "str_repr"


[pymc/pytensorf.py]
pymc/pytensorf.py:206: error: Incompatible types in "yield from" (actual type "Union[TensorVariable[Any, Any], Tuple[Any, Optional[Iterable[Any]]]]", expected type "TensorVariable[Any, Any]")
pymc/pytensorf.py:[23](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:24)1: error: Need type annotation for "replacements" (hint: "replacements: Dict[<type>, <type>] = ...")
pymc/pytensorf.py:250: error: Argument 2 to "clone_get_equiv" has incompatible type "Iterable[TensorVariable[Any, Any]]"; expected "Sequence[Variable[Any, Any]]"
pymc/pytensorf.py:253: error: List comprehension has incompatible type List[Union[Apply[Any], Variable[Any, Any], Op]]; expected List[Variable[Any, Any]]
pymc/pytensorf.py:254: error: List comprehension has incompatible type List[Union[Apply[Any], Variable[Any, Any], Op]]; expected List[Variable[Any, Any]]
pymc/pytensorf.py:269: error: Argument 1 to "list" has incompatible type "List[Variable[Any, Any]]"; expected "Iterable[TensorVariable[Any, Any]]"
pymc/pytensorf.py:271: error: Incompatible return value type (got "Tuple[Iterable[TensorVariable[Any, Any]], Dict[Any, Any]]", expected "Tuple[List[TensorVariable[Any, Any]], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]")
pymc/pytensorf.py:322: error: Argument 2 to "clone_get_equiv" has incompatible type "Iterable[Variable[Any, Any]]"; expected "Sequence[Variable[Any, Any]]"
pymc/pytensorf.py:323: error: List comprehension has incompatible type List[Union[Apply[Any], Variable[Any, Any], Op]]; expected List[Variable[Any, Any]]
pymc/pytensorf.py:326: error: Argument 1 to "_replace_vars_in_graphs" has incompatible type "List[Variable[Any, Any]]"; expected "Iterable[TensorVariable[Any, Any]]"
pymc/pytensorf.py:327: error: Argument "replacement_fn" to "_replace_vars_in_graphs" has incompatible type "Callable[[TensorVariable[Any, Any], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]], List[TensorVariable[Any, Any]]]"; expected "Callable[[TensorVariable[Any, Any]], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]"
pymc/pytensorf.py:331: error: Incompatible return value type (got "List[TensorVariable[Any, Any]]", expected "List[Variable[Any, Any]]")
pymc/pytensorf.py:331: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance
pymc/pytensorf.py:331: note: Consider using "Sequence" instead, which is covariant
pymc/pytensorf.py:331: note: Perhaps you need a type annotation for "graphs"? Suggestion: "List[Variable[Any, Any]]"
pymc/pytensorf.py:358: error: List comprehension has incompatible type List[Union[Apply[Any], Variable[Any, Any], Op]]; expected List[TensorVariable[Any, Any]]
pymc/pytensorf.py:395: error: Argument "replacement_fn" to "_replace_vars_in_graphs" has incompatible type "Callable[[Any, Any], Any]"; expected "Callable[[TensorVariable[Any, Any]], Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]]"
pymc/pytensorf.py:732: error: Invalid index type "Optional[str]" for "Dict[str, ndarray[Any, Any]]"; expected type "str"
pymc/pytensorf.py:741: error: Invalid index type "Optional[str]" for "Dict[str, ndarray[Any, Any]]"; expected type "str"
pymc/pytensorf.py:747: error: Argument 1 to "update" of "MutableMapping" has incompatible type "Dict[TensorVariable[Any, Any], TensorSharedVariable]"; expected "SupportsKeysAndGetItem[TensorVariable[Any, Any], TensorVariable[Any, Any]]"
pymc/pytensorf.py:750: error: Argument 2 to "clone_replace" has incompatible type "Dict[TensorVariable[Any, Any], TensorVariable[Any, Any]]"; expected "Union[Iterable[Tuple[Variable[Any, Any], Variable[Any, Any]]], Dict[Variable[Any, Any], Variable[Any, Any]], None]"
pymc/pytensorf.py:752: error: Incompatible return value type (got "Tuple[List[Variable[Any, Any]], Any]", expected "Tuple[List[TensorVariable[Any, Any]], TensorVariable[Any, Any]]")
pymc/pytensorf.py:976: error: Argument 2 to "zip" has incompatible type "List[Union[RandomState, Generator]]"; expected "Iterable[Variable[Any, Any]]"
pymc/pytensorf.py:977: error: Incompatible return value type (got "List[Variable[Any, Any]]", expected "Sequence[TensorVariable[Any, Any]]")
pymc/pytensorf.py:989: error: Argument 1 to "SeedSequence" has incompatible type "Union[int, Sequence[int], ndarray[Any, Any], SeedSequence, None]"; expected "Union[None, int, Sequence[int], Union[_SupportsArray[dtype[Union[bool_, integer[Any]]]], _NestedSequence[_SupportsArray[dtype[Union[bool_, integer[Any]]]]], bool, int, _NestedSequence[Union[bool, int]]]]"
pymc/pytensorf.py:1123: error: "Variable[Any, Any]" has no attribute "default_update"
pymc/pytensorf.py:1178: error: Argument 1 to "reseed_rngs" has incompatible type "dict_keys[Variable[Any, Any], Variable[Any, Any]]"; expected "Sequence[SharedVariable]"
pymc/pytensorf.py:1222: error: Item "Variable[Any, Any]" of "Union[Variable[Any, Any], Sequence[Variable[Any, Any]], FunctionGraph]" has no attribute "outputs"
pymc/pytensorf.py:1222: error: Item "Sequence[Variable[Any, Any]]" of "Union[Variable[Any, Any], Sequence[Variable[Any, Any]], FunctionGraph]" has no attribute "outputs"


[pymc/sampling/jax.py]
pymc/sampling/jax.py:114: error: Argument "replace" to "clone_replace" has incompatible type "Dict[SharedVariable, TensorConstant[Any]]"; expected "Union[Iterable[Tuple[Variable[Any, Any], Variable[Any, Any]]], Dict[Variable[Any, Any], Variable[Any, Any]], None]"
pymc/sampling/jax.py:115: error: Incompatible return value type (got "List[Variable[Any, Any]]", expected "List[TensorVariable[Any, Any]]")
pymc/sampling/jax.py:136: error: "FunctionGraph" has no attribute "has_destroyers"
pymc/sampling/jax.py:148: error: Unsupported operand type for unary - ("Union[Variable[Any, Any], List[Variable[Any, Any]]]")
pymc/sampling/jax.py:149: error: List item 0 has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "TensorVariable[Any, Any]"
pymc/sampling/jax.py:185: error: X | Y syntax for unions requires Python 3.10
pymc/sampling/jax.py:194: error: Argument 2 to "_device_put" has incompatible type "Optional[Literal['cpu', 'gpu']]"; expected "str"
pymc/sampling/jax.py:198: error: Argument 2 to "_device_put" has incompatible type "Optional[Literal['cpu', 'gpu']]"; expected "str"
pymc/sampling/jax.py:[24](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:25)0: error: X | Y syntax for unions requires Python 3.10
pymc/sampling/jax.py:245: error: Argument "outputs" to "get_jaxified_graph" has incompatible type "Union[Variable[Any, Any], List[Variable[Any, Any]]]"; expected "Optional[List[TensorVariable[Any, Any]]]"
pymc/sampling/jax.py:247: error: Argument 1 to "_postprocess_samples" has incompatible type "List[TensorVariable[Any, Any]]"; expected "Callable[..., Any]"
pymc/sampling/jax.py:[33](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:34)9: error: X | Y syntax for unions requires Python 3.10
pymc/sampling/jax.py:[45](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:46)2: error: Incompatible types in assignment (expression has type "Callable[[F, Union[int, None, Sequence[Any]], Any, Optional[Hashable], Optional[int], Union[Hashable, Tuple[Hashable, ...], None]], F]", variable has type "Callable[[Callable[..., Any], Optional[Hashable], DefaultNamedArg(Any, 'in_axes'), DefaultNamedArg(Any, 'out_axes'), DefaultNamedArg(Union[int, Iterable[int]], 'static_broadcasted_argnums'), DefaultNamedArg(Optional[Sequence[Device]], 'devices'), DefaultNamedArg(Optional[str], 'backend'), DefaultNamedArg(Optional[int], 'axis_size'), DefaultNamedArg(Union[int, Iterable[int]], 'donate_argnums'), DefaultNamedArg(Optional[Tuple[Tuple[int, ...], ...]], 'global_arg_shapes')], Any]")
pymc/sampling/jax.py:[46](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:47)7: error: Argument 1 to "_postprocess_samples" has incompatible type "List[TensorVariable[Any, Any]]"; expected "Callable[..., Any]"
pymc/sampling/jax.py:5[49](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:50): error: X | Y syntax for unions requires Python 3.10
pymc/sampling/jax.py:[69](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:70)5: error: Argument 1 to "_postprocess_samples" has incompatible type "List[TensorVariable[Any, Any]]"; expected "Callable[..., Any]"


[pymc/variational/opvi.py]
pymc/variational/opvi.py:[101](https://github.com/pymc-devs/pymc/actions/runs/6377000973/job/17304888951#step:7:102)3: error: Incompatible return value type (got "Variable[Any, Any]", expected "List[Variable[Any, Any]]")

!!!!!!!!!
1 files unexpectedly failed.
pymc/data.py
These files did not fail before, so please check the above output for errors in {'pymc/data.py'} and fix them.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions