Skip to content

Commit

Permalink
removed prints
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnMars committed Aug 7, 2024
1 parent 16ca218 commit 893c977
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/latent_explorer/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _generate(self, input_ids:torch.Tensor, parse_output:bool) -> Tuple[str, tor

# Parse the output text to JSON
if parse_output and len(generated_text) > 0:
generated_text = text2json(generated_text, max_attempts = 3)
generated_text = text2json(generated_text, max_attempts = 3, verbose = True)

return generated_text, hidden_states

Expand Down
2 changes: 1 addition & 1 deletion src/latent_explorer/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def generate_prompt_template(sys_prompt = None, examples: list[dict] = [], input

return conversation

def text2json(output, max_attempts = 3, verbose = True):
def text2json(output, max_attempts = 3, verbose = False):

# Attempt to parse the output as JSON with some error handling
num_attempts = 0
Expand Down

0 comments on commit 893c977

Please sign in to comment.