Get the appropriate Ray wrapper based on current initialization mode. Returns: StandardRayWrapper for local/remote modes, CodeFlareRayWrapper for KubeRay mode
()
| 876 | |
| 877 | |
| 878 | def get_ray_wrapper() -> Union[StandardRayWrapper, CodeFlareRayWrapper]: |
| 879 | """ |
| 880 | Get the appropriate Ray wrapper based on current initialization mode. |
| 881 | |
| 882 | Returns: |
| 883 | StandardRayWrapper for local/remote modes, CodeFlareRayWrapper for KubeRay mode |
| 884 | """ |
| 885 | global _ray_wrapper |
| 886 | |
| 887 | if _ray_wrapper is None: |
| 888 | # Return a standard Ray wrapper for local/remote modes |
| 889 | _ray_wrapper = StandardRayWrapper() |
| 890 | |
| 891 | return _ray_wrapper |
| 892 | |
| 893 | |
| 894 | def is_ray_initialized() -> bool: |