{"id":23756,"library":"flytekitplugins-ray","title":"Flytekit Ray Plugin","description":"This package provides Ray integration for Flyte workflows, enabling distributed execution on Ray clusters. Current version: 1.16.19. Released approximately monthly alongside flytekit core.","status":"active","version":"1.16.19","language":"python","source_language":"en","source_url":"https://github.com/flyteorg/flytekit/tree/master/plugins/flytekitplugins-ray","tags":["flyte","ray","distributed-computing","workflow"],"install":[{"cmd":"pip install flytekitplugins-ray","lang":"bash","label":"Standard install"}],"dependencies":[{"reason":"Core dependency; must be installed with compatible version.","package":"flytekit","optional":false},{"reason":"Ray runtime; version >=2.0 required.","package":"ray","optional":false}],"imports":[{"note":"The class is named 'Ray', not 'RayExecutor'.","wrong":"from flytekitplugins.ray import RayExecutor","symbol":"Ray","correct":"from flytekitplugins.ray import Ray"},{"note":"","wrong":"","symbol":"RayJobConfig","correct":"from flytekitplugins.ray import RayJobConfig"}],"quickstart":{"code":"from flytekit import task, workflow\nfrom flytekitplugins.ray import Ray, RayJobConfig\n\n@task(task_config=Ray(job_config=RayJobConfig(worker_groups=[...])))\ndef my_ray_task() -> str:\n    import ray\n    ray.init()\n    return \"Ray task completed\"\n\n@workflow\ndef wf() -> str:\n    return my_ray_task()\n\nif __name__ == \"__main__\":\n    print(wf())","lang":"python","description":"Basic Flyte task configured to run on Ray."},"warnings":[{"fix":"Replace 'from flytekitplugins.ray import RayExecutor' with 'from flytekitplugins.ray import Ray' and adjust usage.","message":"In flytekit >=1.12, the Ray plugin API changed: use 'Ray' task_config instead of the old 'RayExecutor'.","severity":"breaking","affected_versions":">=1.12.0"},{"fix":"Do not call ray.init() if you are using RayJobConfig; Flyte handles cluster startup automatically.","message":"Ray initialization inside the task may conflict with the Flyte-managed Ray cluster. Avoid calling ray.init() in tasks that use RayJobConfig.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'worker_group_spec' instead of 'worker_groups' when available, or check for deprecation warnings.","message":"The 'RayJobConfig' worker_groups parameter is being replaced by 'worker_group_spec' in future versions.","severity":"deprecated","affected_versions":">=1.16.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install flytekitplugins-ray'","cause":"The flytekitplugins-ray package is not installed.","error":"ModuleNotFoundError: No module named 'flytekitplugins.ray'"},{"fix":"Upgrade the package: 'pip install --upgrade flytekitplugins-ray'. If still fails, use 'from flytekitplugins.ray import RayExecutor' (old API).","cause":"The plugin version is too old (pre-1.12) or the import path has changed.","error":"ImportError: cannot import name 'Ray' from 'flytekitplugins.ray'"},{"fix":"Set correct address via RayJobConfig(address='auto') or proper cluster endpoint.","cause":"Ray cluster address misconfiguration when using RayJobConfig.","error":"RAY_DASHBOARD_ADDRESS environment variable is set but incorrect"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}