vyasr commented on issue #38325:
URL: https://github.com/apache/arrow/issues/38325#issuecomment-2051698177

   To clarify, it sounds like we're trying to make two separate decisions here. 
It's important to decouple the requirements imposed by the need for a painless 
syntactic evolution of the protocol from the semantics of any particular 
feature of the protocol. The motivation behind the `**kwargs` proposal was to 
make it possible to allow consumers to specify arbitrary arguments without 
seeing errors because a particular producer doesn't support that argument. It 
sounds like from the above discussion we either want the protocol to be clearly 
versioned in a way that consumers can query and have a strictly defined 
signature for each version, or we need the protocol's signature to be flexible 
enough to accommodate any call from the consumer without raising an exception 
solely on the basis of certain arguments not being supported. I think either 
approach is fine, but I wanted to lay out clearly the options as I see them in 
case others differ there, or if they see a preferable alternative
   
   That discussion is separate from the semantics of any particular option. 
Some options may not make sense to allow defaults, or to have optional 
behavior, and we might still need to make such arguments explicit the way that 
Keith did with `    def __arrow_device_array__(self, *, strict=True, 
requested_device=None, **kwargs)`. In that scenario I think it's totally fine 
for the producer to raise an exception saying "f{'Parameter {param} must be 
specified when invoking the device array protocol'}". We probably need to 
document those semantics on a per-parameter basis and make them uniform as part 
of the spec, rather than allow flexibility on a per-producer basis.
   
   On the specific topic of the `requested_device`, I think Joris's proposal 
makes sense. I agree that if a specific device is requested a producer should 
error if the data cannot be transferred to that device. I don't think best 
effort makes a lot of sense here. OTOH the zero-copy remains best-effort if 
`requested_device=None` since it may not always be possible even on the same 
device to provide an entirely zero-copy experience.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to