Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lapp committed Dec 29, 2023
1 parent 4f31fc0 commit f130c98
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions vllm/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def cached_method(*args, **kwargs):
return wrapped_func
return decorator


memoize_by_instance = method_lru_cache(int(1e7))


Expand Down Expand Up @@ -332,12 +333,6 @@ def get_best_matched_terminal(self, seq):

return None, None, None

def get_partial_terminal_ids(self, checked_terminals, seq):
return set([
term for term in checked_terminals
if self._seq_validator[term](seq)[0] is not None
])

@memoize_by_instance
def get_stepped_parser_state(self, new_token_str):
ip = copy(self.interactive_parser)
Expand Down

0 comments on commit f130c98

Please sign in to comment.