Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astronomer/astro-provider-ray
This provider contains operators, decorators and triggers to send a ray job from an airflow task
https://github.com/astronomer/astro-provider-ray
apache-airflow dags mlops-workflow mlpipelines workflow
Last synced: about 1 month ago
JSON representation
This provider contains operators, decorators and triggers to send a ray job from an airflow task
- Host: GitHub
- URL: https://github.com/astronomer/astro-provider-ray
- Owner: astronomer
- License: apache-2.0
- Created: 2024-05-30T03:39:25.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T08:58:28.000Z (2 months ago)
- Last Synced: 2024-10-29T10:06:04.948Z (2 months ago)
- Topics: apache-airflow, dags, mlops-workflow, mlpipelines, workflow
- Language: Python
- Homepage: https://astronomer.github.io/astro-provider-ray/
- Size: 486 KB
- Stars: 11
- Watchers: 6
- Forks: 2
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- Contributing: docs/CONTRIBUTING.rst
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.rst
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
Ray provider:books: [Docs](https://astronomer.github.io/astro-provider-ray/) | :rocket: [Getting Started](https://astronomer.github.io/astro-provider-ray/getting_started/setup.html) | :speech_balloon: [Slack](https://join.slack.com/t/apache-airflow/shared_invite/zt-2nsw28cw1-Lw4qCS0fgme4UI_vWRrwEQ) (``#airflow-ray``) | :fire: [Contribute](https://astronomer.github.io/astro-provider-ray/CONTRIBUTING.html)
Orchestrate your Ray jobs using [Apache Airflow®](https://airflow.apache.org/) combining Airflow's workflow management with Ray's distributed computing capabilities.
Benefits of using this provider include:
- **Integration**: Incorporate Ray jobs into Airflow DAGs for unified workflow management.
- **Distributed computing**: Use Ray's distributed capabilities within Airflow pipelines for scalable ETL, LLM fine-tuning etc.
- **Monitoring**: Track Ray job progress through Airflow's user interface.
- **Dependency management**: Define and manage dependencies between Ray jobs and other tasks in DAGs.
- **Resource allocation**: Run Ray jobs alongside other task types within a single pipeline.## Table of Contents
- [Quickstart](#quickstart)
- [Sample DAGs](#sample-dags)
- [Getting Involved](#getting-involved)
- [Changelog](#changelog)
- [Contributing Guide](#contributing-guide)## Quickstart
Check out the Getting Started guide in our [docs](https://astronomer.github.io/astro-provider-ray/getting_started/setup.html). Sample DAGs are available at [example_dags/](https://github.com/astronomer/astro-provider-ray/tree/main/example_dags).## Sample DAGs
### Example 1: Using @ray.task for job life cycle
The below example showcases how to use the ``@ray.task`` decorator to manage the full lifecycle of a Ray cluster: setup, job execution, and teardown.This approach is ideal for jobs that require a dedicated, short-lived cluster, optimizing resource usage by cleaning up after task completion
https://github.com/astronomer/astro-provider-ray/blob/bd6d847818be08fae78bc1e4c9bf3334adb1d2ee/example_dags/ray_taskflow_example.py#L1-L57
### Example 2: Using SetupRayCluster, SubmitRayJob & DeleteRayCluster
This example shows how to use separate operators for cluster setup, job submission, and teardown, providing more granular control over the process.This approach allows for more complex workflows involving Ray clusters.
Key Points:
- Uses SetupRayCluster, SubmitRayJob, and DeleteRayCluster operators separately.
- Allows for multiple jobs to be submitted to the same cluster before deletion.
- Demonstrates how to pass cluster information between tasks using XCom.This method is ideal for scenarios where you need fine-grained control over the cluster lifecycle, such as running multiple jobs on the same cluster or keeping the cluster alive for a certain period.
https://github.com/astronomer/astro-provider-ray/blob/bd6d847818be08fae78bc1e4c9bf3334adb1d2ee/example_dags/setup-teardown.py#L1-L44
## Getting Involved
| Platform | Purpose | Est. Response time |
|:---:|:---:|:---:|
| [Discussion Forum](https://github.com/astronomer/astro-provider-ray/discussions) | General inquiries and discussions | < 3 days |
| [GitHub Issues](https://github.com/astronomer/astro-provider-ray/issues) | Bug reports and feature requests | < 1-2 days |
| [Slack](https://join.slack.com/t/apache-airflow/shared_invite/zt-2nsw28cw1-Lw4qCS0fgme4UI_vWRrwEQ) | Quick questions and real-time chat | 12 hrs |## Changelog
We follow [Semantic Versioning](https://semver.org/) for releases. Check [CHANGELOG.rst](https://github.com/astronomer/astro-provider-ray/blob/main/CHANGELOG.rst) for the latest changes.## Contributing Guide
All contributions, bug reports, bug fixes, documentation improvements, enhancements are welcome.A detailed overview on how to contribute can be found in the [Contributing Guide](https://github.com/astronomer/astro-provider-ray/blob/main/docs/CONTRIBUTING.rst).
## License
[Apache 2.0 License](https://github.com/astronomer/astro-provider-ray/blob/main/LICENSE)