Actorpool progress bar - #1457
Conversation
Signed-off-by: Ayush Dattagupta <ayushdg95@gmail.com>
…progressbar Signed-off-by: Ayush Dattagupta <ayushdg95@gmail.com>
| import ray | ||
| from loguru import logger | ||
| from ray.util.actor_pool import ActorPool | ||
| from tqdm import tqdm |
There was a problem hiding this comment.
[P1] tqdm import may not be declared dependency for this backend
This adds from tqdm import tqdm, but if tqdm isn’t in this repo’s declared runtime deps for the experimental ray actor pool backend, users will hit ModuleNotFoundError at import time. Consider either adding tqdm to the appropriate dependency set, or making the progress bar optional via a lazy import / fallback when show_progress=True.
| def __init__( | ||
| self, | ||
| config: dict | None = None, | ||
| ignore_head_node: bool = False, | ||
| show_progress: bool = True, | ||
| progress_interval: float = 10.0, | ||
| ): |
There was a problem hiding this comment.
[P2] progress_interval accepts invalid values
tqdm(..., mininterval=self.progress_interval) will raise or behave unexpectedly if progress_interval is <= 0 or non-finite. Since this is a public constructor arg, it’s worth either validating it (e.g., > 0) or documenting constraints.
Description
Usage
# Add snippet demonstrating usageChecklist