Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 19, 2024
1 parent 980a21e commit 002b9de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions thunder/extend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ class TransientOperatorExecutor(OperatorExecutor):
Operators registered through this executor are intended for temporary use
and should not be relied upon for permanent implementations.
"""

def __init__(self):
super().__init__(f"__ad_hoc_executor_{id(self)}")
self.counter = 0 # a counter to disambiguate names
Expand Down
1 change: 1 addition & 0 deletions thunder/tests/test_extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ def test_validate_executors():
with pytest.raises(ValueError, match=re.compile("Expected an Executor or the name of a registered Executor")):
assert thunder.resolve_executors(("python", "foo", pytorch_executor, "bar"))


def test_transient_operator_executor():
from thunder.extend import TransientOperatorExecutor
from functools import partial
Expand Down

0 comments on commit 002b9de

Please sign in to comment.