pymc-devs / pymc-devs/pymc-extras

`convert_flat_trace_to_idata` throws NotImplementedError with Pathfinder and pymc inference backend

Open
#577 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
143
Forks
91
Avg merge
3d 18h
Merged PRs (30d)
19

Description

I get an error message
NotImplementedError: Cannot vectorize node AdvancedSetSubtensor(AllocEmpty{dtype='float'}.0, Subtensor{:, start:}.0, MakeSlice.0, [0 4]) with input MakeSlice.0 of type slice
when trying to run pymc_extras.fit_pathfinder using pymc as the inference backend.

  • This doesn't happen when I manually change the inference backend to blackjax right before calling convert_flat_trace_to_idata.
  • This also doesn't happen when I remove a deterministic node test_income that we are using for testing as seen on the bottom row below.
Image

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 reproducing the failure through pymc_extras.fit_pathfinder with the PyMC inference backend, then inspect convert_flat_trace_to_idata and the deterministic node test_income mentioned in the report. Compare this path with the BlackJAX backend and with test_income removed; done means the reported model converts without the NotImplementedError while preserving the existing behavior.

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.