Spaces:
Running
Running
Fix device labels order.
Browse files- src/visualizer.py +1 -9
src/visualizer.py
CHANGED
|
@@ -435,15 +435,7 @@ def create_pipeline_figure(
|
|
| 435 |
progress_bar.update(1)
|
| 436 |
|
| 437 |
# Set axis properties
|
| 438 |
-
device_labels = [f"Device {i}" for i in range(num_devices)]
|
| 439 |
-
# Modify the ordering to put Device 1 at the top, then Device 0, then the rest
|
| 440 |
-
if num_devices >= 2:
|
| 441 |
-
# Move Device 1 to the top, followed by Device 0
|
| 442 |
-
device_labels = (
|
| 443 |
-
[device_labels[1], device_labels[0]] + device_labels[2:]
|
| 444 |
-
if num_devices > 1
|
| 445 |
-
else device_labels
|
| 446 |
-
)
|
| 447 |
|
| 448 |
# Calculate tick positions with no gaps
|
| 449 |
tick_positions = [(num_devices - i - 1) * y_spacing for i in range(num_devices)]
|
|
|
|
| 435 |
progress_bar.update(1)
|
| 436 |
|
| 437 |
# Set axis properties
|
| 438 |
+
device_labels = [f"Device {i+1}" for i in range(num_devices)]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
|
| 440 |
# Calculate tick positions with no gaps
|
| 441 |
tick_positions = [(num_devices - i - 1) * y_spacing for i in range(num_devices)]
|