Spaces:
Running
Running
Update color and example.
Browse files- README.md +2 -1
- assets/zb1p.png +3 -0
- src/visualizer.py +44 -44
README.md
CHANGED
|
@@ -46,8 +46,9 @@ uv run python main.py strategy=interleave num_devices=4 num_stages=8 num_batches
|
|
| 46 |
|
| 47 |
Running for ZB-1P strategy:
|
| 48 |
```bash
|
| 49 |
-
uv run python main.py strategy=zb1p num_devices=4 num_stages=
|
| 50 |
```
|
|
|
|
| 51 |
|
| 52 |
## Configuration
|
| 53 |
|
|
|
|
| 46 |
|
| 47 |
Running for ZB-1P strategy:
|
| 48 |
```bash
|
| 49 |
+
uv run python main.py strategy=zb1p num_devices=4 num_stages=4 num_batches=8
|
| 50 |
```
|
| 51 |
+

|
| 52 |
|
| 53 |
## Configuration
|
| 54 |
|
assets/zb1p.png
ADDED
|
Git LFS Details
|
src/visualizer.py
CHANGED
|
@@ -42,60 +42,60 @@ def convert_schedule_to_visualization_format(schedule: Schedule):
|
|
| 42 |
# Cache the color calculation as it's repeatedly called with the same parameters
|
| 43 |
@lru_cache(maxsize=128)
|
| 44 |
def get_color(op_type: str, stage_id: int, num_devices: int):
|
| 45 |
-
#
|
| 46 |
forward_colors = [
|
| 47 |
-
"
|
| 48 |
-
"
|
| 49 |
-
"
|
| 50 |
-
"
|
| 51 |
-
"
|
| 52 |
-
"
|
| 53 |
-
"
|
| 54 |
-
"
|
| 55 |
-
"
|
| 56 |
-
"
|
| 57 |
]
|
| 58 |
|
| 59 |
-
#
|
| 60 |
backward_colors = [
|
| 61 |
-
"
|
| 62 |
-
"
|
| 63 |
-
"
|
| 64 |
-
"
|
| 65 |
-
"
|
| 66 |
-
"
|
| 67 |
-
"
|
| 68 |
-
"
|
| 69 |
-
"
|
| 70 |
-
"
|
| 71 |
]
|
| 72 |
|
| 73 |
-
#
|
| 74 |
backward_d_colors = [
|
| 75 |
-
"
|
| 76 |
-
"
|
| 77 |
-
"
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"
|
| 83 |
-
"
|
| 84 |
-
"
|
| 85 |
]
|
| 86 |
|
| 87 |
-
#
|
| 88 |
backward_w_colors = [
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
| 93 |
-
"
|
| 94 |
-
"
|
| 95 |
-
"
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
]
|
| 100 |
|
| 101 |
virtual_stage = stage_id // num_devices
|
|
|
|
| 42 |
# Cache the color calculation as it's repeatedly called with the same parameters
|
| 43 |
@lru_cache(maxsize=128)
|
| 44 |
def get_color(op_type: str, stage_id: int, num_devices: int):
|
| 45 |
+
# A more harmonious blue palette with better progression for forward operations
|
| 46 |
forward_colors = [
|
| 47 |
+
"#5c88f2", # Periwinkle blue
|
| 48 |
+
"#1a53ff", # Deep blue
|
| 49 |
+
"#b3c6ff", # Light blue
|
| 50 |
+
"#4d79ff", # Strong blue
|
| 51 |
+
"#809fff", # Medium blue
|
| 52 |
+
"#0039e6", # Rich navy
|
| 53 |
+
"#002db3", # Dark navy
|
| 54 |
+
"#264db3", # Royal blue
|
| 55 |
+
"#7094db", # Steel blue
|
| 56 |
+
"#99b3e6" # Pale blue
|
| 57 |
]
|
| 58 |
|
| 59 |
+
# Orange palette for backward operations
|
| 60 |
backward_colors = [
|
| 61 |
+
"#ff9933", # Bright orange
|
| 62 |
+
"#ffad5c", # Medium orange
|
| 63 |
+
"#ffc285", # Light orange
|
| 64 |
+
"#ffd6ad", # Pale orange
|
| 65 |
+
"#ff8000", # Deep orange
|
| 66 |
+
"#cc6600", # Dark orange
|
| 67 |
+
"#ff9933", # Vivid orange
|
| 68 |
+
"#ffb366", # Soft orange
|
| 69 |
+
"#cc9966", # Muted orange
|
| 70 |
+
"#ffd699" # Light amber
|
| 71 |
]
|
| 72 |
|
| 73 |
+
# Improved teal/turquoise palette with better progression for backward_D operations
|
| 74 |
backward_d_colors = [
|
| 75 |
+
"#80ffff", # Light cyan
|
| 76 |
+
"#00cccc", # Teal
|
| 77 |
+
"#00e6e6", # Bright teal
|
| 78 |
+
"#33ffff", # Cyan
|
| 79 |
+
"#00b3b3", # Medium teal
|
| 80 |
+
"#008080", # Dark teal
|
| 81 |
+
"#00e6cc", # Turquoise
|
| 82 |
+
"#4ddbbd", # Aqua
|
| 83 |
+
"#80d4c8", # Pale teal
|
| 84 |
+
"#b3e6e0" # Ice
|
| 85 |
]
|
| 86 |
|
| 87 |
+
# Improved green palette with better progression for backward_W operations
|
| 88 |
backward_w_colors = [
|
| 89 |
+
"#00cc66", # Medium green
|
| 90 |
+
"#00e673", # Bright green
|
| 91 |
+
"#33ff99", # Mint green
|
| 92 |
+
"#80ffbf", # Light green
|
| 93 |
+
"#009933", # Forest green
|
| 94 |
+
"#006622", # Dark green
|
| 95 |
+
"#33cc33", # True green
|
| 96 |
+
"#66cc66", # Sage green
|
| 97 |
+
"#99cc99", # Pale green
|
| 98 |
+
"#c6e6c6" # Pastel green
|
| 99 |
]
|
| 100 |
|
| 101 |
virtual_stage = stage_id // num_devices
|