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
« 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#
6class ProgressBatchCallback:
7 """Class for progress callbacks."""
9 def __init__(self):
10 self.current_batch = 0
11 self.total_batches = 0
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