(sample)
| 133 | yield sample |
| 134 | |
| 135 | def process_sample_with_progress(sample): |
| 136 | result = self.invoke(sample) |
| 137 | pbar.update(1) # Update the progress bar |
| 138 | return result |
| 139 | |
| 140 | if not ('async_params' in self.llm_config.keys()): # non async mode, use regular workers |
| 141 | with concurrent.futures.ThreadPoolExecutor(max_workers=num_workers) as executor: |