Upon further investigation it seems that the actual issue is that there is automatically generated default values for each argument:
https://github.com/apache/incubator-mxnet/blob/76bdc8772c7f4edd3087bd1285025122fc837c06/python/mxnet/ndarray/register.py#L67-L88 This results in the following function signature for the smooth_l1 operator: ``` def smooth_l1(data=None, scalar=_Null, out=None, name=None, **kwargs) ``` The problem is that these default values end up getting passed down to the C++ operator implementation and cause the error shown in the description. Ideally, we should only set default values that the user provided when they registered the operator. https://github.com/apache/incubator-mxnet/blob/08f1c2dcba897ccf9568079e198ceb537ec388d4/src/operator/nn/softmax-inl.h#L259-L268 Instead, it looks like all we pass up is the name, type, and description https://github.com/dmlc/tvm/blob/675216fbeb94c835e8267ae97aeed58f129c1c39/nnvm/src/c_api/c_api_symbolic.cc#L70-L78 If we could pass the default values (and a boolean to say whether there is one or not) then we could set the default value in the python argument list correctly. This would allow arguments with required values to fail natively as expected in the higher level language. [ Full content available at: https://github.com/apache/incubator-mxnet/issues/12286 ] This message was relayed via gitbox.apache.org for [email protected]
