소스 검색

modifying how its being displayed becuase now calculating overall percentage in hf_shard_download

cadenmackenzie 8 달 전
부모
커밋
c923ef63db
1개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 8
      exo/api/chatgpt_api.py

+ 4 - 8
exo/api/chatgpt_api.py

@@ -231,14 +231,10 @@ class ChatGPTAPI:
                         if DEBUG >= 2:
                             print(f"Download status for {model_name}: {status}")
                         
-                        # Calculate overall percentage if we have status
-                        download_percentage = None
-                        if status:
-                            percentages = list(status.values())
-                            if percentages:
-                                download_percentage = sum(percentages) / len(percentages)
-                                if DEBUG >= 2:
-                                    print(f"Calculated download percentage for {model_name}: {download_percentage}")
+                        # Get overall percentage from status
+                        download_percentage = status.get("overall") if status else None
+                        if DEBUG >= 2 and download_percentage is not None:
+                            print(f"Overall download percentage for {model_name}: {download_percentage}")
                         
                         model_pool[model_name] = {
                             "name": pretty,