-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ray.get and ray.wait to take in additional argument types #2126
Comments
This seems useful, particularly for |
I like the general idea of the proposal. Extending I am concerned about about consistency with the API. For example, claiming support for Furthermore, why add explicit support for ndarrays which already implement |
@pschafhalter Great point, Consistency in the API is important, which is why I suggest we don't do anything in the The more I think about this the more I think we should wait (no pun intended) to implement it. |
@pschafhalter For the @devin-petersohn Using In terms of return types matching input types, @robertnishihara has said that it might make sense to always return lists regardless of input type. But, I am still torn on this point. |
I can see someone wanting to From an applications perspective, I would prefer the return type to be the same as the input type. Otherwise I am just casting it again and half the convenience of implementing this is lost. The reason I think we should wait is because this feels like a slippery slope. If we start implementing one we can quickly find ourselves trying to support |
@devin-petersohn this relates to the consistency problem I think this introduces in the API. Claiming to support |
My vote is for all 1-D "Flat" data structure including ndarray, dictionary, even set or generator. Users should be using ray.get at their own risk if they were going to pass in a generator etc.
|
I wanted to open a discussion on this API change. The proposal here is shown via an experimental API in #2071. It would be helpful for people to try these out and see what you think; depending on how people feel, we can just support a subset of the types proposed below:
Allow
ray.get
to acceptobject_ids
as lists, tuples, ndarrays and dicts:Allow
ray.wait
to acceptobject_ids
as lists, tuples and ndarrays:Open Questions:
ray.get
match the input type? Or is always returning lists fine? Except the dict case, where it will always return a dict.cc @robertnishihara
The text was updated successfully, but these errors were encountered: