Skip to content

Commit

Permalink
fix initial state bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lapp committed Jan 8, 2024
1 parent c11277c commit 9e313df
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions outlines/fsm/regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ def create_fsm_index_end_to_end(
finals_list.append(final)

all_states = set(fsm_info.transitions.values())
all_states.add(fsm_info.initial)
num_states = max(all_states)
states_to_token_subsets = numba.typed.List(
[numba.typed.List.empty_list(nb_int_pair_type) for _ in range(num_states + 1)]
Expand Down

0 comments on commit 9e313df

Please sign in to comment.