Selaa lähdekoodia

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

cadenmackenzie 8 kuukautta sitten
vanhempi
commit
c923ef63db
1 muutettua tiedostoa jossa 4 lisäystä ja 8 poistoa
  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,