File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 28
28
import pretty as pt
29
29
import problem as pr
30
30
import argparse
31
+ import time
31
32
32
33
DEFINITIONS = None # contains definitions of construction actions
33
34
RULES = None # contains rules of deductions
@@ -567,7 +568,7 @@ def parse_args():
567
568
parser .add_argument (
568
569
'--problems_file' ,
569
570
type = str ,
570
- default = 'examples\ imo_ag_30.txt' ,
571
+ default = 'examples/ imo_ag_30.txt' ,
571
572
help = 'text file contains the problem strings. See imo_ag_30.txt for example.' )
572
573
573
574
parser .add_argument (
@@ -682,6 +683,7 @@ def main(FLAGS):
682
683
)
683
684
FLAGS = parse_args ()
684
685
686
+ start_time = time .perf_counter ()
685
687
if FLAGS .problem_name != '' :
686
688
main (FLAGS )
687
689
else :
@@ -690,4 +692,10 @@ def main(FLAGS):
690
692
if name .startswith ('#' ): continue
691
693
FLAGS .problem_name = name
692
694
FLAGS .out_file = f"{ out_file } /{ name } .txt" if out_file != '' else ''
693
- main (FLAGS )
695
+ try :
696
+ main (FLAGS )
697
+ except Exception as e :
698
+ print (f"exception occurred on { name } :\n { e } " )
699
+
700
+ elapsed_time = time .perf_counter () - start_time
701
+ logging .info (f"Total time = { elapsed_time :.4f} seconds" )
You can’t perform that action at this time.
0 commit comments