MCPcopy
hub / github.com/treeverse/dvc / TqdmCallback

Class TqdmCallback

dvc/fs/callbacks.py:17–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16
17class TqdmCallback(_TqdmCallback):
18 def __init__(
19 self,
20 size: Optional[int] = None,
21 value: int = 0,
22 progress_bar: Optional["tqdm"] = None,
23 tqdm_cls: Optional[type["tqdm"]] = None,
24 **tqdm_kwargs,
25 ):
26 tqdm_kwargs.pop("total", None)
27 super().__init__(
28 tqdm_kwargs=tqdm_kwargs, tqdm_cls=tqdm_cls or Tqdm, size=size, value=value
29 )
30 if progress_bar is not None:
31 self.tqdm = progress_bar
32
33 def branched(self, path_1: "Union[str, BinaryIO]", path_2: str, **kwargs):
34 desc = path_1 if isinstance(path_1, str) else path_2
35 return TqdmCallback(bytes=True, desc=desc)
36
37
38class RichCallback(Callback):

Callers 15

as_callbackMethod · 0.90
_pushMethod · 0.90
_pullMethod · 0.90
migrate_2_to_3Function · 0.90
_fetch_out_changesFunction · 0.90
unprotectMethod · 0.90
_diffFunction · 0.90
_download_studioMethod · 0.90
transferMethod · 0.90
commitMethod · 0.85
_commit_granular_dirMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected