You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/12/08 23:57:34 UTC

[GitHub] [incubator-mxnet] samskalicky opened a new issue #19647: [1.x] No exception for optimize_for when backend missing

samskalicky opened a new issue #19647:
URL: https://github.com/apache/incubator-mxnet/issues/19647


   ## Description
   An exception is not thrown when `optimize_for` is called for an unknown backend. Instead, all that happens is a print message:
   
   ```
   >>> import mxnet as mx
   >>> sym, args, aux=mx.model.load_checkpoint('resnet-18',0)
   [23:54:04] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
   [23:54:04] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
   >>> sym.optimize_for('test')
   [23:54:15] src/c_api/c_api_symbolic.cc:1547: Error optimizing for backend 'test' cannot be found
   <Symbol softmax>
   ```
   
   Notice that `optimize_for` actually returns a copy of the input symbol.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] samskalicky edited a comment on issue #19647: [1.x] No exception for optimize_for when backend missing

Posted by GitBox <gi...@apache.org>.
samskalicky edited a comment on issue #19647:
URL: https://github.com/apache/incubator-mxnet/issues/19647#issuecomment-741269806


   Should we just make this `LOG(FATAL)` instead?
   https://github.com/apache/incubator-mxnet/blob/bbfccaebb7fbb023459f142c594ea9b42ba84621/src/c_api/c_api_symbolic.cc#L1547


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] samskalicky commented on issue #19647: [1.x] No exception for optimize_for when backend missing

Posted by GitBox <gi...@apache.org>.
samskalicky commented on issue #19647:
URL: https://github.com/apache/incubator-mxnet/issues/19647#issuecomment-741309812


   Making the change above now throws an exception:
   ```
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
     File "/home/ubuntu/mxnet/python/mxnet/symbol/symbol.py", line 1617, in optimize_for
       ctypes.byref(new_aux_names)))
     File "/home/ubuntu/mxnet/python/mxnet/base.py", line 246, in check_call
       raise get_last_ffi_error()
   mxnet.base.MXNetError: Traceback (most recent call last):
     File "src/c_api/c_api_symbolic.cc", line 1547
   MXNetError: Error optimizing for backend 'test' cannot be found
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] samskalicky commented on issue #19647: [1.x] No exception for optimize_for when backend missing

Posted by GitBox <gi...@apache.org>.
samskalicky commented on issue #19647:
URL: https://github.com/apache/incubator-mxnet/issues/19647#issuecomment-741269806


   Should we just make this `LOG(FATAL)` instead?
   https://github.com/apache/incubator-mxnet/blob/v1.x/src/c_api/c_api_symbolic.cc#L1547


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org