Skip to content

Commit eed20b7

Browse files
author
Judd
committed
check of invalid LM output
1 parent fec6de3 commit eed20b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/alphageometry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,10 @@ def try_translate_constrained_to_construct(string: str, g: gh.Graph) -> str:
337337
if string[-1] != ';':
338338
return 'ERROR: must end with ;'
339339

340+
parts = string.split(' : ')
341+
if len(parts) != 2:
342+
return 'ERROR: too many `:` separated parts'
343+
340344
head, prem_str = string.split(' : ')
341345
point = head.strip()
342346

@@ -686,6 +690,7 @@ def main(FLAGS):
686690
PLOT = False
687691
out_file = FLAGS.out_file
688692
for name in pr.Problem.from_txt_file(FLAGS.problems_file, to_dict=True).keys():
693+
if name.startswith('#'): continue
689694
FLAGS.problem_name = name
690695
FLAGS.out_file = f"{out_file}/{name}.txt" if out_file != '' else ''
691696
main(FLAGS)

0 commit comments

Comments
 (0)