pymc-devs / pymc-devs/pymc

BUG: Possible shape problem in `_build_marginal_likelihood_loglik`

Open
#6,366 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
9.8k
Forks
2.3k
Avg merge
21h 39m
Merged PRs (30d)
5

Description

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).

https://github.com/pymc-devs/pymc/blob/5688555f437747ae7d6b5ec0b81c3c2867ba8d5a/pymc/gp/gp.py#L743-L746

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running pytest -v pymc/tests/gp/test_gp.py::TestMarginalApproxSigmaParams::test_catch_warnings and inspect the _build_marginal_likelihood_loglik code linked in pymc/gp/gp.py around lines 743-746. Trace how c receives shape (10, 30) and compare it with the dot(c, c) inputs and the reported incompatible shapes. Done means the test passes without the ValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.