@@ -82,7 +82,7 @@ def update(self, step, reward, action_type):
8282 correctness = Back .BLUE + "example"
8383
8484 # Print out information about performance
85- log .info (Fore .CYAN + "Streak Controller Udpate:" , step , reward , correctness )
85+ log .info (Fore .CYAN + "Streak Controller Udpate: {} {} {}" . format ( step , reward , correctness ) )
8686
8787 # This controller updates the knowledge component based on the interface marked in the
8888 # Selection field - here, that corresponds to the step variable.
@@ -93,16 +93,15 @@ def update(self, step, reward, action_type):
9393
9494 for skill in kcs :
9595 if skill not in self .correct_counts :
96- log .info ("ERROR:" , skill , "not included in kc_list adding... (" ,
97- problem_name , ", " , step , ")" )
96+ log .info ("ERROR: {} not included in kc_list adding... ({}, {})" .format (skill , problem_name , step ))
9897 self .correct_counts [skill ] = 0
9998
10099 if correctness_numeric == 1 :
101100 self .correct_counts [skill ] += 1
102101 else :
103102 self .correct_counts [skill ] = 0
104103
105- log .info ("Streak count for %s after update: %i" % (skill , self .correct_counts [skill ]))
104+ log .info ("Streak count for {} after update: {}" . format (skill , self .correct_counts [skill ]))
106105
107106 def get_problem_kcs (self , problem ):
108107 if ("kc_list" in problem ):
@@ -136,12 +135,12 @@ def next_problem(self,student=None):
136135 # All skills have been mastered or we've asked as many
137136 # problems as allowed - stop training.
138137 self .test_mode = True ;
139- log .info ("Streak counts when entering testing:" , self .correct_counts )
140- log .info ("Skills mastered:" , self .all_skills_mastered ())
138+ log .info ("Streak counts when entering testing: {}" . format ( self .correct_counts ) )
139+ log .info ("Skills mastered: {}" . format ( self .all_skills_mastered () ))
141140
142141 if not self .test_mode :
143- log .info ("Asking for problem " , self .num_problems )
144- log .info ("Streak counts: " , self .correct_counts )
142+ log .info ("Asking for problem {}" . format ( self .num_problems ) )
143+ log .info ("Streak counts: {}" . format ( self .correct_counts ) )
145144 # Choose a problem with the most unmastered skills
146145
147146 max_unmastered_kcs = 0
@@ -168,8 +167,8 @@ def next_problem(self,student=None):
168167
169168 if len (problem_with_unmastered_kcs ) == 0 :
170169 self .test_mode = True ;
171- log .info ("Streak counts when entering testing:" , self .correct_counts )
172- log .info ("Skills mastered:" , self .all_skills_mastered ())
170+ log .info ("Streak counts when entering testing: {}" . format ( self .correct_counts ) )
171+ log .info ("Skills mastered: {}" . format ( self .all_skills_mastered () ))
173172 else :
174173 # Choose a random problem from problems with the maximum unmastered skills
175174 nxt = choice (problem_with_unmastered_kcs )
@@ -186,5 +185,5 @@ def next_problem(self,student=None):
186185 nxt ["test_mode" ] = True
187186 return nxt
188187 else :
189- log .info ("Problems in training ( total number =" , self .num_problems , ")" )
188+ log .info ("Problems in training ( total number = {} )" . format ( self .num_problems ) )
190189 return None # done training
0 commit comments