mirror of
https://github.com/wassname/ray.git
synced 2026-09-11 12:43:20 +08:00
Change os.uname()[1] and socket.gethostname() to the portable and faster platform.node_ip() (#8839)
Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
import platform
|
||||
from typing import List
|
||||
|
||||
import ray
|
||||
@@ -58,7 +58,7 @@ class Aggregator(ParallelIteratorWorker):
|
||||
super().__init__(generator, repeat=False)
|
||||
|
||||
def get_host(self):
|
||||
return os.uname()[1]
|
||||
return platform.node()
|
||||
|
||||
def set_weights(self, weights, global_vars):
|
||||
self.weights = weights
|
||||
|
||||
Reference in New Issue
Block a user