You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not able to reproduce these errors locally (but some others) in Python 3.11.7.
Will check python 3.8.
Edit, here are my local pyright outputs:
Python 3.8.19:
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
0 errors, 0 warnings, 0 informations
Python 3.10.13 / 3.11.7
/root/sbi/sbi/analysis/plot.py
/root/sbi/sbi/analysis/plot.py:184:16 - error: Argument of type "tuple[Tensor, Tensor, Tensor, Tensor]" cannot be assigned to parameter "extent" of type "tuple[float, float, float, float] | None" in function "imshow"
Type "tuple[Tensor, Tensor, Tensor, Tensor]" cannot be assigned to type "tuple[float, float, float, float] | None"
"tuple[Tensor, Tensor, Tensor, Tensor]" is incompatible with "tuple[float, float, float, float]"
Tuple entry 1 is incorrect type
"Tensor" is incompatible with "float"
"tuple[Tensor, Tensor, Tensor, Tensor]" is incompatible with "None" (reportArgumentType)
/root/sbi/sbi/analysis/plot.py:394:21 - error: Argument of type "tuple[Unknown | Tensor, Unknown | Tensor]" cannot be assigned to parameter "left" of type "float | tuple[float, float] | None" in function "set_xlim"
Type "tuple[Unknown | Tensor, Unknown | Tensor]" cannot be assigned to type "float | tuple[float, float] | None"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "float"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "tuple[float, float]"
Tuple entry 1 is incorrect type
Type "Unknown | Tensor" cannot be assigned to type "float"
"Tensor" is incompatible with "float"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "None" (reportArgumentType)
/root/sbi/sbi/analysis/plot.py:397:21 - error: Argument of type "tuple[Unknown | Tensor, Unknown | Tensor]" cannot be assigned to parameter "bottom" of type "float | tuple[float, float] | None" in function "set_ylim"
Type "tuple[Unknown | Tensor, Unknown | Tensor]" cannot be assigned to type "float | tuple[float, float] | None"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "float"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "tuple[float, float]"
Tuple entry 1 is incorrect type
Type "Unknown | Tensor" cannot be assigned to type "float"
"Tensor" is incompatible with "float"
"tuple[Unknown | Tensor, Unknown | Tensor]" is incompatible with "None" (reportArgumentType)
/root/sbi/sbi/analysis/plot.py:1975:19 - error: No overloads for "delete" match the provided arguments (reportCallIssue)
/root/sbi/sbi/analysis/plot.py:1975:29 - error: Argument of type "BarContainer | Polygon | list[BarContainer | Polygon]" cannot be assigned to parameter "arr" of type "ArrayLike" in function "delete" (reportArgumentType)
5 errors, 0 warnings, 0 informations
So, it seems to be some GitHub workflow environment-specific problem ...
The second error expects a node always to have the key "fn," which might not be true.
Not sure why this only happens in GitHub workflows (likely different pyro versions?)
Activity
manuelgloeckler commentedon Jun 11, 2024
I am not able to reproduce these errors locally (but some others) in Python 3.11.7.
Will check python 3.8.
Edit, here are my local pyright outputs:
So, it seems to be some GitHub workflow environment-specific problem ...
manuelgloeckler commentedon Jun 11, 2024
Okay, I fixed it in #1165. In the end it was:
Not sure why this only happens in GitHub workflows (likely different pyro versions?)