Fix python api SetDeviceNumber issue, Aliase input0 and output0#9
Fix python api SetDeviceNumber issue, Aliase input0 and output0#9tonychen01 wants to merge 1 commit intoviscloud:masterfrom
Conversation
ccanel
left a comment
There was a problem hiding this comment.
@syang100 @tonychen01 Is there a better way to solve this source/sink-naming problem? If the user is trying to add an operator to their pipeline, then shouldn't they know what the sources and sinks are actually called? And for multi-input and multi-output operators, I think that it's perfectly reasonable to expect people to know that these special operators have sources/sinks that end in an index. For the Python API, the boilerplate should handle this issue, not the underlying implementation. In general, problems like this are a sign that the interface is wrong. But if you say that it's too invasive of a problem to fix right now, then I'll approve this patch.
Also, this PR should contain two commits, one for fixing the SetDeviceNumber issue and one for adding the source/sink aliases. But don't worry about fixing it this time.
|
For the source/sink naming issue, under many circumstances of pipeline have one camera as input, operators which support multi inputs/outpus have input0 output0, this fix coult let user easily aliase name input0 -> input, output0 -> output. For the python API, SetDeviceNumber is a member function of SafPython object, should not definded as global function but a member function. |
No description provided.