提交 151da532 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Thomas Wiecki

Update pre-commit

上级 a30f815f
......@@ -7,7 +7,7 @@ exclude: |
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: debug-statements
exclude: |
......@@ -25,9 +25,10 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
language_version: python39
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
......
......@@ -54,6 +54,7 @@ from typing import Callable, List, Optional, Union
import numpy as np
import pytensor
import pytensor.link.utils as link_utils
from pytensor import tensor as at
from pytensor.compile.builders import construct_nominal_fgraph, infer_shape
from pytensor.compile.function.pfunc import pfunc
......@@ -75,7 +76,6 @@ from pytensor.graph.replace import clone_replace
from pytensor.graph.utils import InconsistencyError, MissingInputError
from pytensor.link.c.basic import CLinker
from pytensor.link.c.exceptions import MissingGXX
from pytensor.link.utils import raise_with_op
from pytensor.printing import op_debug_information
from pytensor.scan.utils import ScanProfileStats, Validator, forced_replace, safe_new
from pytensor.tensor.basic import as_tensor_variable
......@@ -1627,7 +1627,7 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
if hasattr(self.fn.vm, "position_of_error") and hasattr(
self.fn.vm, "thunks"
):
raise_with_op(
link_utils.raise_with_op(
self.fn.maker.fgraph,
self.fn.vm.nodes[self.fn.vm.position_of_error],
self.fn.vm.thunks[self.fn.vm.position_of_error],
......@@ -1930,7 +1930,7 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
# done by raise_with_op is not implemented in C.
if hasattr(vm, "thunks"):
# For the CVM
raise_with_op(
link_utils.raise_with_op(
self.fn.maker.fgraph,
vm.nodes[vm.position_of_error],
vm.thunks[vm.position_of_error],
......@@ -1940,7 +1940,7 @@ class Scan(Op, ScanMethodsMixin, HasInnerGraph):
# We don't have access from python to all the
# temps values So for now, we just don't print
# the extra shapes/strides info
raise_with_op(
link_utils.raise_with_op(
self.fn.maker.fgraph, vm.nodes[vm.position_of_error]
)
else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论