__init__.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import ray._private.worker
  2. try:
  3. from ray.serve._private.logging_utils import configure_default_serve_logger
  4. from ray.serve.api import (
  5. Application,
  6. Deployment,
  7. RunTarget,
  8. _run,
  9. _run_many,
  10. delete,
  11. deployment,
  12. get_app_handle,
  13. get_deployment_handle,
  14. get_multiplexed_model_id,
  15. get_replica_context,
  16. ingress,
  17. multiplexed,
  18. run,
  19. run_many,
  20. shutdown,
  21. shutdown_async,
  22. start,
  23. status,
  24. )
  25. from ray.serve.batching import batch
  26. from ray.serve.config import HTTPOptions
  27. except ModuleNotFoundError as e:
  28. e.msg += (
  29. '. You can run `pip install "ray[serve]"` to install all Ray Serve'
  30. " dependencies."
  31. )
  32. raise e
  33. # Setup default ray.serve logger to ensure all serve module logs are captured.
  34. configure_default_serve_logger()
  35. # Mute the warning because Serve sometimes intentionally calls
  36. # ray.get inside async actors.
  37. ray._private.worker.blocking_get_inside_async_warned = True
  38. __all__ = [
  39. "_run",
  40. "_run_many",
  41. "batch",
  42. "start",
  43. "HTTPOptions",
  44. "get_replica_context",
  45. "shutdown",
  46. "shutdown_async",
  47. "ingress",
  48. "deployment",
  49. "run",
  50. "run_many",
  51. "RunTarget",
  52. "delete",
  53. "Application",
  54. "Deployment",
  55. "multiplexed",
  56. "get_multiplexed_model_id",
  57. "status",
  58. "get_app_handle",
  59. "get_deployment_handle",
  60. ]