(description, iteration_counter, total_items, progress_bar_length=20)
| 44 | |
| 45 | # callback function for training runs |
| 46 | def print_progress_bar(description, iteration_counter, total_items, progress_bar_length=20): |
| 47 | global current_bar |
| 48 | global bars |
| 49 | global texts |
| 50 | global training_window |
| 51 | # update the window and the bars |
| 52 | button, values = training_window.read(timeout=0) |
| 53 | if button is None: # if user closed the window on us, exit |
| 54 | return |
| 55 | if bars[current_bar].update_bar(iteration_counter, max=total_items) is False: |
| 56 | return |
| 57 | texts[current_bar].update(description) # show the training dataset name |
| 58 | if iteration_counter == total_items: |
| 59 | current_bar += 1 |
| 60 | |
| 61 | def speak(text): |
| 62 | global i |
nothing calls this directly
no test coverage detected