Skip to content

Commit

Permalink
Type correction: cacheable_vocabulary is of type Tuple[Tuple[str, int…
Browse files Browse the repository at this point in the history
…], ...]
  • Loading branch information
miftahmoha committed Feb 22, 2024
1 parent 7d102aa commit 8209b6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions outlines/fsm/fsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class RegexFSM(FSM):
def __init__(self, regex_string: str, tokenizer):
@cache()
def create_states_mapping(
regex_string: str, cacheable_vocabulary: Tuple[Tuple[str, int]]
regex_string: str, cacheable_vocabulary: Tuple[Tuple[str, int], ...]
) -> Tuple[dict, set]:
"""Create the variables related to the mapping between states and tokens
The parameters of the function are used for caching purpose
Expand Down Expand Up @@ -189,7 +189,7 @@ def from_interegular_fsm(
from_interegular_instance = cls.__new__(cls)

def create_states_mapping_from_interegular_fsm(
fsm: interegular.fsm.FSM, cacheable_vocabulary: Tuple[Tuple[str, int]]
fsm: interegular.fsm.FSM, cacheable_vocabulary: Tuple[Tuple[str, int], ...]
) -> Tuple[dict, set]:
"""Create the variables related to the mapping between states and tokens
The parameters of the function are used for caching purpose
Expand Down

0 comments on commit 8209b6c

Please sign in to comment.