Alex Cheema hai 1 ano
pai
achega
c59ceab821
Modificáronse 2 ficheiros con 10 adicións e 4 borrados
  1. 6 0
      exo/viz/test_topology_viz.py
  2. 4 4
      exo/viz/topology_viz.py

+ 6 - 0
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,

+ 4 - 4
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: