Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

use prefect task name as remote function name #103

Merged

Conversation

j-tr
Copy link
Contributor

@j-tr j-tr commented Nov 13, 2023

Closes #86

Example

from prefect import flow, task
from prefect_ray import RayTaskRunner
from time import sleep

@task(
    name="Worker Task Name",
)
def worker_function():
    sleep(100)


@flow(task_runner=RayTaskRunner)
def main(
):
    worker_function.submit()

if __name__ == "__main__":
    main()

image

Screenshots

Checklist

  • References any related issue by including "Closes #" or "Closes ".
    • If no issue exists and your change is not a small fix, please create an issue first.
  • Includes tests or only affects documentation.
  • Passes pre-commit checks.
    • Run pre-commit install && pre-commit run --all locally for formatting and linting.
  • Includes screenshots of documentation updates.
    • Run mkdocs serve view documentation locally.
  • Summarizes PR's changes in CHANGELOG.md

@j-tr j-tr requested a review from a team as a code owner November 13, 2023 10:40
@j-tr j-tr changed the title task name use prefect task name as remote function name Nov 13, 2023
@j-tr j-tr force-pushed the prefect-task-name-as-ray-renote-function-name branch 2 times, most recently from b6f1185 to eb35669 Compare November 14, 2023 09:48
@j-tr j-tr force-pushed the prefect-task-name-as-ray-renote-function-name branch from eb35669 to 4db5c1d Compare November 14, 2023 10:03
@azmyrajab
Copy link

this looks good to me - thanks a lot
Can we go ahead and merge this?

@azmyrajab
Copy link

@PrefectHQ/open-source, sorry to chase, wondering if someone can do a quick review to unblock this? Code looks good and the feature is very nice to have

@j-tr
Copy link
Contributor Author

j-tr commented Dec 4, 2023

@desertaxle it would be great to receive some feedback on this 🙏

Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, but I want to update the changelog entry since we've had a few releases since this PR was initially submitted. Sorry for the review delay and thanks for your patience!

CHANGELOG.md Outdated Show resolved Hide resolved
@desertaxle
Copy link
Member

Tests are failing due to a new version of pytest-asyncio. I'll submit a PR to unblock CI.

@desertaxle desertaxle merged commit a5a82c7 into PrefectHQ:main Dec 6, 2023
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propagating prefect task names to ray tasks instead of it showing up as _run_prefect_task in the Ray dashboard
3 participants