Переглянути джерело

Update --update_period and --expiration defaults (#410)

Alexander Borzunov 2 роки тому
батько
коміт
fd19c21859
2 змінених файлів з 2 додано та 2 видалено
  1. 1 1
      src/petals/cli/run_server.py
  2. 1 1
      src/petals/server/server.py

+ 1 - 1
src/petals/cli/run_server.py

@@ -110,7 +110,7 @@ def main():
                              'If set to "auto" (default), the script evaluates network and compute throughput '
                              'on the first run and uses these estimates for future runs. '
                              'If set to "eval", the script re-evaluates the throughput and overrides the cache.')
-    parser.add_argument('--update_period', type=float, required=False, default=60,
+    parser.add_argument('--update_period', type=float, required=False, default=120,
                         help='Server will report blocks to DHT once in this many seconds')
     parser.add_argument('--expiration', type=float, required=False, default=None,
                         help='DHT entries will expire after this many seconds')

+ 1 - 1
src/petals/server/server.py

@@ -118,7 +118,7 @@ class Server:
         self.dht_prefix = dht_prefix
 
         if expiration is None:
-            expiration = max(3 * update_period, MAX_DHT_TIME_DISCREPANCY_SECONDS)
+            expiration = max(2 * update_period, MAX_DHT_TIME_DISCREPANCY_SECONDS)
         self.expiration = expiration
 
         self.request_timeout = request_timeout