ejschwartz commited on
Commit
2456748
·
1 Parent(s): 03ad973

improve debug prompt strings

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,7 +51,7 @@ def field_prompt(code):
51
  if len(fields) > 0:
52
  prompt += f"{fields[0]}:"
53
 
54
- print(f"field prompt: {prompt}")
55
 
56
  return prompt, fields, field_helper_result
57
 
@@ -78,7 +78,7 @@ def infer(code):
78
  # ejs: Yeah, this var_name thing is really bizarre. But look at https://github.com/lt-asset/resym/blob/main/training_src/fielddecoder_inf.py
79
  var_prompt = f"What are the original name and data types of variables {varstring}?\n```\n{code}\n```{first_var}"
80
 
81
- print(f"Prompt:\n{var_prompt}")
82
 
83
  var_input_ids = tokenizer.encode(var_prompt, return_tensors="pt").cuda()[
84
  :, : 8192 - 1024
 
51
  if len(fields) > 0:
52
  prompt += f"{fields[0]}:"
53
 
54
+ print(f"field prompt: {repr(prompt)}")
55
 
56
  return prompt, fields, field_helper_result
57
 
 
78
  # ejs: Yeah, this var_name thing is really bizarre. But look at https://github.com/lt-asset/resym/blob/main/training_src/fielddecoder_inf.py
79
  var_prompt = f"What are the original name and data types of variables {varstring}?\n```\n{code}\n```{first_var}"
80
 
81
+ print(f"Prompt:\n{repr(var_prompt)}")
82
 
83
  var_input_ids = tokenizer.encode(var_prompt, return_tensors="pt").cuda()[
84
  :, : 8192 - 1024