Skip to content

Commit

Permalink
feat: Support multiple RayPipelines (#4078)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan-fedor committed Feb 7, 2023
1 parent 3e4a220 commit a3016f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion haystack/pipelines/ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def __init__(
:param serve_args: Optional parameters for initializing Ray Serve.
"""
ray_args = ray_args or {}
ray.init(address=address, **ray_args)
if not ray.is_initialized():
ray.init(address=address, **ray_args)
else:
logger.warning("Ray was already initialized, so reusing that for this RayPipeline.")
self._serve_controller_client = serve.start(**serve_args)
super().__init__()

Expand Down

0 comments on commit a3016f0

Please sign in to comment.