singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [singa] chrishkchris commented on a change in pull request #770: Update setup.py to build wheel packages
Date Tue, 21 Jul 2020 05:26:51 GMT

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



Mime
View raw message