MCPcopy
hub / github.com/ray-project/ray / test_distributed_tqdm_iterator

Function test_distributed_tqdm_iterator

python/ray/tests/test_tqdm.py:61–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60
61def test_distributed_tqdm_iterator():
62 mgr = tqdm_ray.instance()
63 mgr.bar_groups.clear()
64
65 assert sum(tqdm_ray.tqdm(range(100), desc="baz", flush_interval_s=0)) == sum(
66 range(100)
67 )
68 wait_for_condition(lambda: len(mgr.bar_groups) == 1)
69 assert len(mgr.bar_groups) == 1
70 bar_group = list(mgr.bar_groups.values())[0]
71 assert len(bar_group.bars_by_uuid) == 1
72 bar = list(bar_group.bars_by_uuid.values())[0]
73 assert bar.bar.n == 100, bar.bar.n
74 assert "baz" in bar.bar.desc, bar.bar.desc
75
76
77def test_flush_interval():

Callers

nothing calls this directly

Calls 7

wait_for_conditionFunction · 0.90
listFunction · 0.85
sumFunction · 0.70
rangeFunction · 0.50
instanceMethod · 0.45
clearMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…