Bladeren bron

Enable rebalancing by default

Aleksandr Borzunov 2 jaren geleden
bovenliggende
commit
ae792db7ac
2 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. 5 3
      cli/run_server.py
  2. 1 1
      src/server/server.py

+ 5 - 3
cli/run_server.py

@@ -80,9 +80,11 @@ def main():
                         help='Path of a file with custom nn.modules, wrapped into special decorator')
     parser.add_argument('--identity_path', type=str, required=False, help='Path to identity file to be used in P2P')
 
-    parser.add_argument("--min_balance_quality", type=float, default=0.0,
-                        help="Rebalance the swarm if its balance quality (a number in [0.0, 1.0]) "
-                             "goes below this threshold. Default: rebalancing is disabled")
+    parser.add_argument("--min_balance_quality", type=float, default=0.75,
+                        help="Rebalance the swarm if its throughput is worse than "
+                             "this share of the optimal throughput. Default: 0.75 (means 75%). "
+                             "Use 0.0 to disable rebalancing, values > 1.0 to force rebalancing on each check "
+                             "for debugging purposes.")
     parser.add_argument("--mean_balance_check_period", type=float, default=150,
                         help="Check the swarm's balance every N seconds (and rebalance it if necessary)")
 

+ 1 - 1
src/server/server.py

@@ -61,7 +61,7 @@ class Server(threading.Thread):
         expiration: Optional[float] = None,
         prefetch_batches: int = 1,
         sender_threads: int = 1,
-        min_balance_quality: float = 0.0,
+        min_balance_quality: float = 0.75,
         mean_balance_check_period: float = 150,
         mean_block_selection_delay: float = 0.5,
         use_auth_token: Optional[str] = None,