Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
082081ae
提交
082081ae
authored
1月 26, 2024
作者:
Virgile Andreani
提交者:
Ricardo Vieira
1月 27, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove noqas that are already taken care of
上级
06c5acdf
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
34 行增加
和
34 行删除
+34
-34
destroyhandler.py
pytensor/graph/destroyhandler.py
+1
-1
basic.py
pytensor/link/c/basic.py
+1
-1
lazylinker_c.py
pytensor/link/c/lazylinker_c.py
+2
-2
op.py
pytensor/scan/op.py
+1
-1
scan_perform_ext.py
pytensor/scan/scan_perform_ext.py
+1
-1
sp.py
pytensor/sparse/sandbox/sp.py
+1
-1
__init__.py
pytensor/tensor/__init__.py
+25
-25
blas.py
pytensor/tensor/blas.py
+1
-1
blas.py
pytensor/tensor/rewriting/blas.py
+1
-1
没有找到文件。
pytensor/graph/destroyhandler.py
浏览文件 @
082081ae
...
@@ -249,7 +249,7 @@ def fast_inplace_check(fgraph, inputs):
...
@@ -249,7 +249,7 @@ def fast_inplace_check(fgraph, inputs):
return
inputs
return
inputs
class
DestroyHandler
(
Bookkeeper
):
# noqa
class
DestroyHandler
(
Bookkeeper
):
"""
"""
The DestroyHandler class detects when a graph is impossible to evaluate
The DestroyHandler class detects when a graph is impossible to evaluate
because of aliasing and destructive operations.
because of aliasing and destructive operations.
...
...
pytensor/link/c/basic.py
浏览文件 @
082081ae
...
@@ -1718,7 +1718,7 @@ class _CThunk:
...
@@ -1718,7 +1718,7 @@ class _CThunk:
def
__init__
(
self
,
cthunk
,
init_tasks
,
tasks
,
error_storage
,
module
):
def
__init__
(
self
,
cthunk
,
init_tasks
,
tasks
,
error_storage
,
module
):
# Lazy import to avoid compilation when importing pytensor.
# Lazy import to avoid compilation when importing pytensor.
from
pytensor.link.c.cutils
import
run_cthunk
# noqa
from
pytensor.link.c.cutils
import
run_cthunk
self
.
run_cthunk
=
run_cthunk
self
.
run_cthunk
=
run_cthunk
self
.
cthunk
=
cthunk
self
.
cthunk
=
cthunk
...
...
pytensor/link/c/lazylinker_c.py
浏览文件 @
082081ae
...
@@ -23,7 +23,7 @@ lazylinker_ext: Optional[ModuleType] = None
...
@@ -23,7 +23,7 @@ lazylinker_ext: Optional[ModuleType] = None
def
try_import
():
def
try_import
():
global
lazylinker_ext
global
lazylinker_ext
sys
.
path
[
0
:
0
]
=
[
config
.
compiledir
]
sys
.
path
[
0
:
0
]
=
[
config
.
compiledir
]
import
lazylinker_ext
# noqa
import
lazylinker_ext
del
sys
.
path
[
0
]
del
sys
.
path
[
0
]
...
@@ -167,4 +167,4 @@ except ImportError:
...
@@ -167,4 +167,4 @@ except ImportError:
from
lazylinker_ext.lazylinker_ext
import
CLazyLinker
,
get_version
# noqa
from
lazylinker_ext.lazylinker_ext
import
CLazyLinker
,
get_version
# noqa
from
lazylinker_ext.lazylinker_ext
import
*
# noqa
from
lazylinker_ext.lazylinker_ext
import
*
# noqa
assert
force_compile
or
(
version
==
get_version
())
# noqa
assert
force_compile
or
(
version
==
get_version
())
pytensor/scan/op.py
浏览文件 @
082081ae
...
@@ -3395,7 +3395,7 @@ def profile_printer(
...
@@ -3395,7 +3395,7 @@ def profile_printer(
)
)
@op_debug_information.register
(
Scan
)
# noqa
@op_debug_information.register
(
Scan
)
def
_op_debug_information_Scan
(
op
:
Scan
,
node
:
Apply
):
def
_op_debug_information_Scan
(
op
:
Scan
,
node
:
Apply
):
from
collections.abc
import
Sequence
from
collections.abc
import
Sequence
...
...
pytensor/scan/scan_perform_ext.py
浏览文件 @
082081ae
...
@@ -5,7 +5,7 @@ To update the `Scan` Cython code you must
...
@@ -5,7 +5,7 @@ To update the `Scan` Cython code you must
- update the version value in this file and in `scan_perform.pyx`
- update the version value in this file and in `scan_perform.pyx`
"""
"""
from
pytensor.scan.scan_perform
import
get_version
,
perform
# noqa: F401
, E402
from
pytensor.scan.scan_perform
import
get_version
,
perform
# noqa: F401
version
=
0.326
# must match constant returned in function get_version()
version
=
0.326
# must match constant returned in function get_version()
...
...
pytensor/sparse/sandbox/sp.py
浏览文件 @
082081ae
...
@@ -158,7 +158,7 @@ class ConvolutionIndices(Op):
...
@@ -158,7 +158,7 @@ class ConvolutionIndices(Op):
for
ox
in
np
.
arange
(
lbound
[
1
],
ubound
[
1
],
dx
,
dtype
=
int
):
for
ox
in
np
.
arange
(
lbound
[
1
],
ubound
[
1
],
dx
,
dtype
=
int
):
# kern[l] is filter value to apply at (oj,oi)
# kern[l] is filter value to apply at (oj,oi)
# for (iy,ix)
# for (iy,ix)
l
=
0
# noqa: E741
l
=
0
# ... ITERATE OVER INPUT UNITS IN RECEPTIVE FIELD
# ... ITERATE OVER INPUT UNITS IN RECEPTIVE FIELD
for
ky
in
oy
+
np
.
arange
(
kshp
[
0
],
dtype
=
int
):
for
ky
in
oy
+
np
.
arange
(
kshp
[
0
],
dtype
=
int
):
...
...
pytensor/tensor/__init__.py
浏览文件 @
082081ae
...
@@ -99,35 +99,38 @@ def _get_vector_length_Constant(op: Union[Op, Variable], var: Constant) -> int:
...
@@ -99,35 +99,38 @@ def _get_vector_length_Constant(op: Union[Op, Variable], var: Constant) -> int:
return
len
(
var
.
data
)
return
len
(
var
.
data
)
import
pytensor.tensor.exceptions
# noqa
import
pytensor.tensor.exceptions
from
pytensor.gradient
import
grad
,
hessian
,
jacobian
# noqa
import
pytensor.tensor.rewriting
from
pytensor.gradient
import
grad
,
hessian
,
jacobian
# adds shared-variable constructors
# adds shared-variable constructors
from
pytensor.tensor
import
sharedvar
# noqa
from
pytensor.tensor
import
(
from
pytensor.tensor
import
(
# noqa
blas
,
blas
,
blas_c
,
blas_c
,
blas_scipy
,
blas_scipy
,
sharedvar
,
xlogx
,
xlogx
,
)
)
import
pytensor.tensor.rewriting
# isort: off
# isort: off
from
pytensor.tensor
import
linalg
# noqa
from
pytensor.tensor
import
linalg
from
pytensor.tensor
import
special
from
pytensor.tensor
import
special
# For backward compatibility
# For backward compatibility
from
pytensor.tensor
import
nlinalg
# noqa
from
pytensor.tensor
import
nlinalg
from
pytensor.tensor
import
slinalg
# noqa
from
pytensor.tensor
import
slinalg
# isort: on
# isort: on
from
pytensor.tensor.basic
import
*
# noqa
# Allow accessing numpy constants from pytensor.tensor
from
pytensor.tensor.blas
import
batched_dot
,
batched_tensordot
# noqa
from
numpy
import
e
,
euler_gamma
,
inf
,
infty
,
nan
,
newaxis
,
pi
from
pytensor.tensor.extra_ops
import
*
from
pytensor.tensor.shape
import
(
# noqa
from
pytensor.tensor.basic
import
*
from
pytensor.tensor.blas
import
batched_dot
,
batched_tensordot
from
pytensor.tensor.extra_ops
import
*
from
pytensor.tensor.io
import
*
from
pytensor.tensor.math
import
*
from
pytensor.tensor.shape
import
(
reshape
,
reshape
,
shape
,
shape
,
shape_padaxis
,
shape_padaxis
,
...
@@ -137,21 +140,18 @@ from pytensor.tensor.shape import ( # noqa
...
@@ -137,21 +140,18 @@ from pytensor.tensor.shape import ( # noqa
specify_shape
,
specify_shape
,
)
)
from
pytensor.tensor.io
import
*
# noqa
from
pytensor.tensor.math
import
*
# noqa
# We import as `_shared` instead of `shared` to avoid confusion between
# We import as `_shared` instead of `shared` to avoid confusion between
# `pytensor.shared` and `tensor._shared`.
# `pytensor.shared` and `tensor._shared`.
from
pytensor.tensor.sort
import
argsort
,
argtopk
,
sort
,
topk
,
topk_and_argtopk
# noqa
from
pytensor.tensor.sort
import
argsort
,
argtopk
,
sort
,
topk
,
topk_and_argtopk
from
pytensor.tensor.subtensor
import
*
# noqa
from
pytensor.tensor.subtensor
import
*
from
pytensor.tensor.type
import
*
# noqa
from
pytensor.tensor.type
import
*
from
pytensor.tensor.type_other
import
*
# noqa
from
pytensor.tensor.type_other
import
*
from
pytensor.tensor.variable
import
TensorConstant
,
TensorVariable
# noqa
from
pytensor.tensor.variable
import
TensorConstant
,
TensorVariable
from
pytensor.tensor.functional
import
vectorize
# noqa
# Allow accessing numpy constants from pytensor.tensor
from
numpy
import
e
,
euler_gamma
,
inf
,
infty
,
nan
,
newaxis
,
pi
# noqa
# isort: off
from
pytensor.tensor.functional
import
vectorize
# isort: on
__all__
=
[
"random"
]
# noqa: F405
__all__
=
[
"random"
]
# noqa: F405
pytensor/tensor/blas.py
浏览文件 @
082081ae
...
@@ -83,7 +83,7 @@ import numpy as np
...
@@ -83,7 +83,7 @@ import numpy as np
try
:
try
:
import
numpy.__config__
# noqa
import
numpy.__config__
except
ImportError
:
except
ImportError
:
pass
pass
...
...
pytensor/tensor/rewriting/blas.py
浏览文件 @
082081ae
...
@@ -63,7 +63,7 @@ from pytensor.tensor.rewriting.basic import register_specialize
...
@@ -63,7 +63,7 @@ from pytensor.tensor.rewriting.basic import register_specialize
try
:
try
:
import
numpy.__config__
# noqa
import
numpy.__config__
except
ImportError
:
except
ImportError
:
pass
pass
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论