Victarry commited on
Commit
1170f1a
·
1 Parent(s): 06107a3

Update color and example.

Browse files
Files changed (3) hide show
  1. README.md +2 -1
  2. assets/zb1p.png +3 -0
  3. 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=8 num_batches=8
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
+ ![zb1p](assets/zb1p.png)
52
 
53
  ## Configuration
54
 
assets/zb1p.png ADDED

Git LFS Details

  • SHA256: 67def73c178ad13b74035d2e5cae999c4e24adaa0e5ac41f78193ab7a6b52b59
  • Pointer size: 130 Bytes
  • Size of remote file: 81.7 kB
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
- # Color palettes for different virtual stages
46
  forward_colors = [
47
- "royalblue", # Stage 0
48
- "cornflowerblue", # Stage 1
49
- "dodgerblue", # Stage 2
50
- "steelblue", # Stage 3
51
- "lightskyblue", # Stage 4
52
- "deepskyblue", # Stage 5
53
- "mediumblue", # Stage 6
54
- "mediumslateblue",# Stage 7
55
- "slateblue", # Stage 8
56
- "darkslateblue" # Stage 9
57
  ]
58
 
59
- # Updated to orange/brown palette for backward operations
60
  backward_colors = [
61
- "darkorange", # Stage 0
62
- "orange", # Stage 1
63
- "sandybrown", # Stage 2
64
- "peru", # Stage 3
65
- "chocolate", # Stage 4
66
- "sienna", # Stage 5
67
- "saddlebrown", # Stage 6
68
- "brown", # Stage 7
69
- "darkgoldenrod", # Stage 8
70
- "goldenrod" # Stage 9
71
  ]
72
 
73
- # Updated to teal/turquoise palette for backward_D operations
74
  backward_d_colors = [
75
- "mediumaquamarine", # Stage 8
76
- "cadetblue", # Stage 2
77
- "lightseagreen", # Stage 6
78
- "cyan", # Stage 0
79
- "teal", # Stage 1
80
- "mediumturquoise",# Stage 3
81
- "turquoise", # Stage 4
82
- "aquamarine", # Stage 5
83
- "darkturquoise", # Stage 7
84
- "paleturquoise" # Stage 9
85
  ]
86
 
87
- # Updated to green palette for backward_W operations
88
  backward_w_colors = [
89
- "limegreen", # Stage 2
90
- "forestgreen", # Stage 0
91
- "green", # Stage 1
92
- "seagreen", # Stage 3
93
- "mediumseagreen", # Stage 4
94
- "springgreen", # Stage 5
95
- "mediumspringgreen", # Stage 6
96
- "palegreen", # Stage 7
97
- "lightgreen", # Stage 8
98
- "darkseagreen" # Stage 9
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