Coverage for intelligence_toolkit/helpers/progress_batch_callback.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-10-16 13:41 -0300

1# Copyright (c) 2024 Microsoft Corporation. All rights reserved. 

2# Licensed under the MIT license. See LICENSE file in the project. 

3# 

4 

5 

6class ProgressBatchCallback: 

7 """Class for progress callbacks.""" 

8 

9 def __init__(self): 

10 self.current_batch = 0 

11 self.total_batches = 0 

12 

13 def on_batch_change(self, current: int, total: int, message: str = ""): 

14 """Handle when a new token is generated.""" 

15 self.current_batch = current 

16 self.total_batches = total 

17 self.message = message