chatglm3-6b Arena Human Preference 55K
Optimize the following code. def polllro( self, operations: List[Operation]) -> None:…
- User
Optimize the following code.
def _poll_lro( self, operations: List[Operation]) -> None: """ Polls the long running operations. """ start_time = time.time()
while True: status = [exponential_backoff(op.done) for op in operations] if all(status): print("Completed!") break print(f"{sum(status)}/{len(status)} completed") time.sleep(60) end_time = time.time() print(f"Time taken: {end_time-start_time} secs") - Assistant
def _poll_lro(operations: List[Operation]) -> None: """ Polls the long running operations. """ start_time = time.time()
while True: status = [op.done for op in operations] if all(status): print("Completed!") break print(f"{sum(status)}/{len(status)} completed") time.sleep(60) end_time = time.time() print(f"Time taken: {end_time-start_time} secs")
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.