mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +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:
@@ -7,10 +7,10 @@ import ray
|
||||
|
||||
@ray.remote
|
||||
def gethostname(x):
|
||||
import platform
|
||||
import time
|
||||
import socket
|
||||
time.sleep(0.01)
|
||||
return x + (socket.gethostname(), )
|
||||
return x + (platform.node(), )
|
||||
|
||||
|
||||
def wait_for_nodes(expected):
|
||||
|
||||
Reference in New Issue
Block a user