Assumption handler for Eye fails on a Blockwise Eye: unpacks batched output shape
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend, machine-learning
Línea de trabajo
Start with pytensor/assumptions/selection.py and the _eye handler; compare its shape unpacking with the delegation in pytensor/assumptions/blockwise.py. Reproduce the issue with the vectorized example in the report, then check that compiling it no longer logs the rewrite failure. Pull request #2688 is already open against this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Compiling a vectorized graph that adds pt.identity_like to a matrix before cholesky and cho_solve logs a rewrite failure from orthogonal_solve_to_transpose_matmul. The Blockwise handler in pytensor/assumptions/blockwise.py hands the batched node to the core Eye handler, _eye. That handler does rows, cols = node.outputs[0].type.shape, which raises ValueError on the 3D output.
import pytensor
import pytensor.tensor as pt
def jittered_cho_solve(F, v):
L = pt.linalg.cholesky(F + pt.identity_like(F) * 1e-8)
return pt.linalg.cho_solve((L, True), v)
F = pt.tensor("F", shape=(4, 2, 2))
v = pt.tensor("v", shape=(4, 2))
out = pt.vectorize(jittered_cho_solve, signature="(p,p),(p)->(p)")(F, v)
pytensor.function([F, v], out) # logs "Rewrite failure due to: orthogonal_solve_to_transpose_matmul"
traceback
Rewrite failure due to: orthogonal_solve_to_transpose_matmul
node: Blockwise{CholeskySolve{lower=True, b_ndim=1, overwrite_b=False}, (m,m),(m)->(m)}(Blockwise{Cholesky{lower=True, overwrite_a=False}, (m,m)->(m,m)}.0, v)
TRACEBACK:
Traceback (most recent call last):
...
File ".../pytensor/assumptions/blockwise.py", line 11, in _blockwise_delegate
return infer_assumption_for_node(
File ".../pytensor/assumptions/core.py", line 411, in infer_assumption_for_node
output_states = fn(key, op, feature, fgraph, node, input_states)
File ".../pytensor/assumptions/selection.py", line 89, in _eye
rows, cols = node.outputs[0].type.shape
ValueError: too many values to unpack (expected 2, got 3)
- Lenguaje dominante
- Python
- Estrellas
- 654
- Forks
- 258
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 39
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pymc-devs/pytensor
-
Docs of mode still mentions C/CVM as the default with FAST_RUNPosiblemente ocupada @ADITYASINGH1206 la tomó hace 8 días. Abiertodocs
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pymc-devs/pytensor#2641 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Update conditions page in docsAbiertodocs
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
BUG: geomspace returns wrong sign for the endpoints when start and stop are negativePosiblemente ocupada @mayuriphad la tomó hace 27 días. Abierto
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Reciprocal.impl computes np.float32(1.0) / x: float32 precision for float64 scalars under NEP 50 (Python linker)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pymc-devs/pytensor#2430 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pymc-devs/pytensor#2428 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de pymc-devs/pytensor
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dgunning/edgartools#2019 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
topoteretes/cognee#6818 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
source_verification_agent: no outcome when the publisher confirms a work but its DOI resolves to a different recordPosiblemente ocupada @pinjun99 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Imbad0202/academic-research-skills#1159 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: DoubleMLData.from_arrays checks the treatment d with force_all_x_finite instead of force_all_d_finitePosiblemente ocupada @leninworld la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
DoubleML/doubleml-for-py#471 ·
Los mantenedores suelen responder en 1 día