Skip to content

Commit f7ca986

Browse files
change marker
Signed-off-by: Youngeun Kwon <[email protected]>
1 parent 45d9680 commit f7ca986

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nemo_rl/algorithms/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ def visualize_per_worker_timeline(
458458
) -> None:
459459
dp_ranks = list(metric_dict.keys())
460460
max_timeline_length = 50
461-
marker = {0: "□", 1: "⧅", 2: "⛝", 3: "■"}
461+
marker = {0: "▁", 1: "▃", 2: "▅", 3: "▆", 4: "▉"}
462+
# marker = {0: "□", 1: "⧅", 2: "⛝", 3: "■"}
462463

463464
max_value = max(max(v) for v in metric_dict.values())
464465
bin_width = (max_value + 1) / len(marker)
@@ -484,10 +485,10 @@ def visualize_per_worker_timeline(
484485
timeline.append(marker[min(int(value // bin_width), len(marker) - 1)])
485486
if timeline_interval is not None:
486487
print(
487-
f" - Generation Worker {dp_idx:3.0f}: {' '.join(timeline)} (Active: {active:.2f} s, Idle: {idle:.2f} s)"
488+
f" - Generation Worker {dp_idx:3.0f}: {''.join(timeline)} (Active: {active:.2f} s, Idle: {idle:.2f} s)"
488489
)
489490
else:
490-
print(f" - Generation Worker {dp_idx:3.0f}: {' '.join(timeline)}")
491+
print(f" - Generation Worker {dp_idx:3.0f}: {''.join(timeline)}")
491492

492493
if "vllm_logger_metrics" in metrics:
493494
# vllm_logger_metrics: dict[str (metric_name), dict[int (dp_idx), list[int] (metric_values)]]

0 commit comments

Comments
 (0)