pymc-devs / pymc-devs/pytensor

Allow sparse variables to have dummy dimensions to the left?

Open
#839 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

sparse variables
Dominant language
Python
Stars
644
Forks
208
Avg merge
2d 14h
Merged PRs (30d)
16

Description

Description

Or have rewrites that handle this case. Otherwise it's hard / impossible to use Sparse variables in Blockwise/RandomVariables that have other batched inputs, but would otherwise work fine with a non-batched implicitly broadcasted sparse variable.

These Ops add explicit batch dimensions

This is the case in the CAR distribution in PyMC for example

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 CAR distribution case with a sparse variable and another batched input, then inspect the Blockwise/RandomVariables handling of explicit batch dimensions. Compare it with the non-batched implicitly broadcasted sparse case and determine whether dummy left dimensions or rewrites are the intended behavior. Done means the case works without breaking existing sparse broadcasting.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.