fix:worker_register_host parameter does not work (#527)

fix:worker_register_host parameter does not work
Close #526
This commit is contained in:
FangYin Cheng 2023-09-03 18:32:10 +08:00 committed by GitHub
commit b8f09df45e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,7 +587,11 @@ def _create_local_model_manager(
from pilot.utils.net_utils import _get_ip_address
client = ModelRegistryClient(worker_params.controller_addr)
host = _get_ip_address()
host = (
worker_params.worker_register_host
if worker_params.worker_register_host
else _get_ip_address()
)
port = worker_params.port
async def register_func(worker_run_data: WorkerRunData):