MCPcopy Create free account
hub / github.com/Ropedia/SpatialBench / __init__

Method __init__

benchmark/models/scal3r/utils/console_utils.py:154–187  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

152
153 class tqdm_rich(std_tqdm):
154 def __init__(self, *args, **kwargs):
155 custom_progress = kwargs.pop("progress", None)
156 options = kwargs.pop("options", {}).copy()
157 super().__init__(*args, **kwargs)
158 if self.disable:
159 return
160
161 d = self.format_dict
162 if custom_progress is None:
163 custom_progress = progress
164 custom_progress.columns = (
165 TimeColumn(),
166 "[progress.description]{task.description}[progress.percentage]{task.percentage:>4.0f}%",
167 BarColumn(),
168 FractionColumn(
169 unit_scale=d["unit_scale"],
170 unit_divisor=d["unit_divisor"],
171 ),
172 TimeElapsedColumn(),
173 "<",
174 TimeRemainingColumn(),
175 RateColumn(
176 unit=d["unit"],
177 unit_scale=d["unit_scale"],
178 unit_divisor=d["unit_divisor"],
179 ),
180 )
181 elif options:
182 for key, value in options.items():
183 setattr(custom_progress, key, value)
184
185 self._prog = custom_progress
186 self._prog.start()
187 self._task_id = self._prog.add_task(self.desc or "", **d)
188
189 def close(self):
190 if self.disable:

Callers 1

__init__Method · 0.45

Calls 3

TimeColumnClass · 0.85
RateColumnClass · 0.85
copyMethod · 0.80

Tested by

no test coverage detected