Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: log when worker started #147

Merged
merged 5 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions xinference/core/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ async def add_worker(self, worker_address: str):

worker_ref = await xo.actor_ref(address=worker_address, uid=WorkerActor.uid())
self._worker_address_to_worker[worker_address] = worker_ref
logger.info("Worker %s has been added successfully", worker_address)

async def report_worker_status(
self, worker_address: str, status: Dict[str, ResourceStatus]
Expand Down
2 changes: 1 addition & 1 deletion xinference/deploy/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def start_supervisor_components(address: str, host: str, port: int):
)
await restful_actor.serve()
url = f"http://{host}:{port}"
logger.info(f"Server address: {url}")
logger.info(f"Xinference successfully started. Endpoint: {url}")
return url


Expand Down
4 changes: 4 additions & 0 deletions xinference/deploy/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
# limitations under the License.

import asyncio
import logging
from typing import Dict, Optional

import xoscar as xo

from ..core.service import WorkerActor

logger = logging.getLogger(__name__)


async def start_worker_components(address: str, supervisor_address: str):
actor_pool_config = await xo.get_pool_config(address)
Expand All @@ -35,6 +38,7 @@ async def start_worker_components(address: str, supervisor_address: str):
supervisor_address=supervisor_address,
subpool_addresses=subpool_addresses, # exclude the main actor pool.
)
logger.info(f"Xinference worker successfully started.")


async def _start_worker(
Expand Down