ray-project / ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
34.21k stars 5.81k forks source link

Workflows: Type stubs are incorrect: argument missing for parameter status_filter #24367

Open tekumara opened 2 years ago

tekumara commented 2 years ago

What happened + What you expected to happen

Given the types already exist on the function, the type stubs aren't needed and are incorrect.

eg:

The type stubs for list_all expect the status_filter parameter:

def list_all(status_filter: Optional[Union[WorkflowStatus, Set[WorkflowStatus]]]) -> List[Tuple[str, WorkflowStatus]]: ...

but the function has a default arg of None and so the arg not needed:

def list_all(
    status_filter: Optional[
        Union[Union[WorkflowStatus, str], Set[Union[WorkflowStatus, str]]]
    ] = None
) -> List[Tuple[str, WorkflowStatus]]:
Screen Shot 2022-04-30 at 11 13 34 pm

Versions / Dependencies

1.12.0

Reproduction script

from ray import workflow

workflow.list_all()

pyright errors with

3:1 error: Argument missing for parameter "status_filter" (reportGeneralTypeIssues)

Issue Severity

Low: It annoys or frustrates me.

stale[bot] commented 2 years ago

Hi, I'm a bot from the Ray team :)

To help human contributors to focus on more relevant issues, I will automatically add the stale label to issues that have had no activity for more than 4 months.

If there is no further activity in the 14 days, the issue will be closed!

You can always ask for help on our discussion forum or Ray's public slack channel.

tekumara commented 2 years ago

ping

zhe-thoughts commented 2 years ago

Thank for reporting this @tekumara . Since Ray Workflows is an experimental feature, I'm putting this as a P2 issue in our team's backlog. Meanwhile we also encourage the community to take a look and submit a fix

zhe-thoughts commented 2 years ago

Maybe @suquark can take a look when you have time?