[object Object]

← back to Exo

viz spacing

c59ceab8212dfe402b67c45233756d9288d9dcbb · 2024-08-07 13:06:07 +0100 · Alex Cheema

Files touched

Diff

commit c59ceab8212dfe402b67c45233756d9288d9dcbb
Author: Alex Cheema <alexcheema123@gmail.com>
Date:   Wed Aug 7 13:06:07 2024 +0100

    viz spacing
---
 exo/viz/test_topology_viz.py | 6 ++++++
 exo/viz/topology_viz.py      | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/exo/viz/test_topology_viz.py b/exo/viz/test_topology_viz.py
index f7b80d83..573bc383 100644
--- a/exo/viz/test_topology_viz.py
+++ b/exo/viz/test_topology_viz.py
@@ -22,6 +22,8 @@ def create_hf_repo_progress_event(
     if file_progress is None:
         file_progress = {
             "file1.bin": RepoFileProgressEvent(
+                repo_id="repo_id",
+                repo_revision="repo_revision",
                 file_path="file1.bin",
                 downloaded=100000000,
                 downloaded_this_session=50000000,
@@ -31,6 +33,8 @@ def create_hf_repo_progress_event(
                 status="in_progress"
             ),
             "file2.bin": RepoFileProgressEvent(
+                repo_id="repo_id",
+                repo_revision="repo_revision",
                 file_path="file2.bin",
                 downloaded=200000000,
                 downloaded_this_session=100000000,
@@ -42,6 +46,8 @@ def create_hf_repo_progress_event(
         }
 
     return RepoProgressEvent(
+        repo_id="repo_id",
+        repo_revision="repo_revision",
         completed_files=completed_files,
         total_files=total_files,
         downloaded_bytes=downloaded_bytes,
diff --git a/exo/viz/topology_viz.py b/exo/viz/topology_viz.py
index 97936adf..6491456d 100644
--- a/exo/viz/topology_viz.py
+++ b/exo/viz/topology_viz.py
@@ -195,10 +195,10 @@ class TopologyViz:
     return "\n".join("".join(str(char) for char in row) for row in visualization)
 
   def _generate_download_layout(self) -> Table:
-    summary = Table(show_header=False, box=None, padding=(0, 1))
-    summary.add_column("Info", style="cyan", no_wrap=True)
-    summary.add_column("Progress", style="cyan", no_wrap=True)
-    summary.add_column("Percentage", style="cyan", no_wrap=True)
+    summary = Table(show_header=False, box=None, padding=(0, 1), expand=True)
+    summary.add_column("Info", style="cyan", no_wrap=True, ratio=50)
+    summary.add_column("Progress", style="cyan", no_wrap=True, ratio=40)
+    summary.add_column("Percentage", style="cyan", no_wrap=True, ratio=10)
 
     # Current node download progress
     if self.node_id in self.node_download_progress:

← 0a588d04 viz styles  ·  back to Exo  ·  download progress styling 7a65a96e →