初始化项目,由ModelHub XC社区提供模型
Model: ayh015/myLightningOPD Source: Original Platform
This commit is contained in:
13
slime/ray/ray_actor.py
Normal file
13
slime/ray/ray_actor.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from slime.utils.misc import get_current_node_ip, get_free_port
|
||||
|
||||
|
||||
class RayActor:
|
||||
@staticmethod
|
||||
def _get_current_node_ip_and_free_port(start_port=10000, consecutive=1):
|
||||
return get_current_node_ip(), get_free_port(start_port=start_port, consecutive=consecutive)
|
||||
|
||||
def get_master_addr_and_port(self):
|
||||
return self.master_addr, self.master_port
|
||||
Reference in New Issue
Block a user