Skip to content

Commit

Permalink
add attribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lapp committed Dec 29, 2023
1 parent a88e506 commit 4f31fc0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vllm/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,10 @@ def get_str_matched_parts(seq):


def method_lru_cache(*lru_args, **lru_kwargs):
# https://stackoverflow.com/a/44078118
def decorator(func):
@functools.wraps(func)
def wrapped_func(self, *args, **kwargs):
# We're storing the wrapped method inside the instance. If we had
# a strong reference to self the instance would never die.
self_weak = weakref.ref(self)
@functools.wraps(func)
@functools.lru_cache(*lru_args, **lru_kwargs)
Expand Down

0 comments on commit 4f31fc0

Please sign in to comment.