Skip to content

BUG: Possible shape problem in _build_marginal_likelihood_loglik #6366

@michaelosthege

Description

@michaelosthege

Describe the issue:

Working on #6365 I ran into a shape problem with pymc/tests/gp/test_gp.py::TestMarginalApproxSigmaParams::test_catch_warnings

I debugged it to the point where I identified the c variable to be causing it because it has shape (10, 30) and that doesn't work for dot(c, c).

pymc/pymc/gp/gp.py

Lines 743 to 746 in 5688555

c = solve_lower(L_B, at.dot(A, r_l))
constant = 0.5 * X.shape[0] * at.log(2.0 * np.pi)
logdet = 0.5 * at.sum(at.log(Lamd)) + at.sum(at.log(at.diag(L_B)))
quadratic = 0.5 * (at.dot(r, r_l) - at.dot(c, c))

I don't know if this is created by, or discovered by the static shape handling changes.

Reproduceable code example:

pytest -v pymc/tests/gp/test_gp.py::TestMarginalApproxSigmaParams::test_catch_warnings

Error message:

ValueError: Incompatible Elemwise input shapes [(30, 30), (10, 30)]

PyMC version information:

main

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions