Skip to content

Commit 96ec531

Browse files
author
ischweer
committed
Lint
1 parent 90880e2 commit 96ec531

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pytensor/link/pytorch/dispatch/basic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ def pytorch_typify_tensor(data, dtype=None, **kwargs):
3939
def pytorch_typify_no_conversion_needed(data, **kwargs):
4040
return data
4141

42+
4243
@pytorch_typify.register(np.number)
4344
def pytorch_typify_extract(data, **kwargs):
4445
return data.item()
4546

47+
4648
@singledispatch
4749
def pytorch_funcify(op, node=None, storage_map=None, **kwargs):
4850
"""Create a PyTorch compatible function from an PyTensor `Op`."""

pytensor/link/pytorch/linker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ class wrapper:
5151
"""
5252

5353
def __init__(self, fn, gen_functors):
54-
self._fn = fn
5554
self.fn = torch.compile(fn)
5655
self.gen_functors = gen_functors.copy()
5756

pytensor/link/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,7 @@ def fgraph_to_python(
758758
new_output_name = unique_name(i)
759759
getter_unique_name = unique_name(getter_or_value)
760760
global_env[getter_unique_name] = getter_or_value
761-
assign_str = (
762-
f"{new_output_name} = {getter_unique_name}()"
763-
)
761+
assign_str = f"{new_output_name} = {getter_unique_name}()"
764762
body_assigns.append(assign_str)
765763
node_input_names.append(new_output_name)
766764
continue

0 commit comments

Comments
 (0)