You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@singa.apache.org by GitBox <gi...@apache.org> on 2020/07/21 05:26:51 UTC

[GitHub] [singa] chrishkchris commented on a change in pull request #770: Update setup.py to build wheel packages

chrishkchris commented on a change in pull request #770:
URL: https://github.com/apache/singa/pull/770#discussion_r457842648



##########
File path: src/api/singa.i
##########
@@ -25,10 +25,5 @@
 %include "config.i"
 %include "core_tensor.i"
 %include "core_device.i"
-%include "model_layer.i"
-%include "model_optimizer.i"

Review comment:
       Without `%include "model_optimizer.i"` the old optimizer test case does not work
   
   ```
   ======================================================================
   ERROR: test_sgd (test_optimizer.TestOptimizer)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
     File "/root/dcsysh/singa/test/python/test_optimizer.py", line 77, in test_sgd
       sgd = opt.SGD(lr)
     File "/root/dcsysh/singa/build/python/singa/optimizer.py", line 222, in __init__
       self.opt = singa.CreateOptimizer('SGD'.encode())
   AttributeError: module 'singa.singa_wrap' has no attribute 'CreateOptimizer'
   ```

##########
File path: src/api/singa.i
##########
@@ -25,10 +25,5 @@
 %include "config.i"
 %include "core_tensor.i"
 %include "core_device.i"
-%include "model_layer.i"
-%include "model_optimizer.i"
-%include "model_loss.i"
-%include "model_metric.i"
 %include "model_operation.i"
-%include "io_snapshot.i"
-%include "dist_communicator.i"

Review comment:
       the dist_communicator.i is the interface between c and python, without `include "dist_communicator.i"` the commuicator cannot be found in python code
   
   ```
   ======================================================================
   ERROR: test_dist (unittest.loader._FailedTest)
   ----------------------------------------------------------------------
   ImportError: Failed to import test module: test_dist
   Traceback (most recent call last):
     File "/usr/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
       module = self._get_module_from_name(name)
     File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
       __import__(name)
     File "/root/dcsysh/singa/test/python/test_dist.py", line 27, in <module>
       sgd = opt.DistOpt(sgd)
     File "/root/dcsysh/singa/build/python/singa/opt.py", line 362, in __init__
       self.communicator = singa.Communicator(buffSize)
   AttributeError: module 'singa.singa_wrap' has no attribute 'Communicator'
   
   ```

##########
File path: src/api/singa.i
##########
@@ -25,10 +25,5 @@
 %include "config.i"
 %include "core_tensor.i"
 %include "core_device.i"
-%include "model_layer.i"
-%include "model_optimizer.i"
-%include "model_loss.i"

Review comment:
       Without `%include "model_loss.i"` the old loss test case does not work 
   ```
   ======================================================================
   ERROR: test_softmax_cross_entropy (test_loss.TestLoss)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
     File "/root/dcsysh/singa/test/python/test_loss.py", line 62, in test_softmax_cross_entropy
       sce = loss.SoftmaxCrossEntropy()
     File "/root/dcsysh/singa/build/python/singa/loss.py", line 118, in __init__
       self.swig_loss = singa.SoftmaxCrossEntropy()
   AttributeError: module 'singa.singa_wrap' has no attribute 'SoftmaxCrossEntropy'
   ```




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