Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshC8C7 committed Nov 28, 2024
1 parent b6abea1 commit 037fc46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion lmformatenforcer/jsonschemaparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def get_allowed_characters(self) -> str:
# characters when the object stack is empty (= we are done parsing)
allowed_characters = WHITESPACE_CHARACTERS

print("MAXCONSWS: ", self.config.max_consecutive_whitespaces)
if self.num_consecutive_whitespaces >= self.config.max_consecutive_whitespaces:
# print("Filtering whitespace characters")
allowed_characters = "".join(c for c in allowed_characters if c not in WHITESPACE_CHARACTERS)
Expand Down
1 change: 0 additions & 1 deletion lmformatenforcer/tokenenforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def _apply_new_characters(self, state: 'TokenEnforcer.OutputTensorState', token_
new_characters = new_decoded[len(prev_decoded):]

if len(new_characters) == 1 and self.tokenizer_tree.tokens_to_strs.get(token_sequence[-2]) == '�' and self.tokenizer_tree.tokens_to_strs[new_token] == '�':
print("TRIGGERED")
decoded_unicode_char = self.decoder(token_sequence[-2:])
new_characters = 'X'*len(decoded_unicode_char)

Expand Down

0 comments on commit 037fc46

Please sign in to comment.