mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-03 01:55:12 +00:00
optimized context test time consumption (#446)
This commit is contained in:
@@ -46,6 +46,7 @@ def free_port():
|
||||
while True:
|
||||
try:
|
||||
sock = socket.socket()
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
port = random.randint(20000, 65000)
|
||||
sock.bind(('localhost', port))
|
||||
sock.close()
|
||||
|
Reference in New Issue
Block a user