xchainer icon indicating copy to clipboard operation
xchainer copied to clipboard

test_packer.NNpackerTestCase fail

Open tanabata-kitajima opened this issue 9 years ago • 1 comments

test_packerを実行したところ、Assertion Errorが発生します。 環境: Python 2.7.6 appdirs 1.4.0 chainer 1.4.1 decorator 4.0.4 filelock 2.0.5 nose 1.3.7 numpy 1.10.1 pip 7.1.2 protobuf 2.6.1 py 1.4.30 pycuda 2015.1.3 pytest 2.8.2 pytools 2015.1.6 scikit-learn 0.17 scikits.audiolab 0.11.0 scikits.talkbox 0.2.5 scipy 0.16.1 setuptools 18.2 six 1.10.0 wheel 0.24.0 xchainer 0.1.0

手元で漁ってみたところ, numpy.array か cuda.array を想定している箇所に <type 'str'> が入っているような気がします。 test_packerに問題があるのではないでしょうか?

以下エラーログです。

======================================================================
FAIL: test_execute (test_packer.NNpackerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/xxxx/work/xchainer/tests/test_packer.py", line 68, in test_execute
    result = self.nnp.execute(datasets)
  File "xchainer/packer.py", line 28, in execute
    self.entryDatas = self.insource(datasets)
  File "xchainer/packer.py", line 36, in insource
    entries = [{ep: Variable(datasets[ep])} for ep in self.entryPoints]
  File "/home/xxxx/work/chainer/local/lib/python2.7/site-packages/chainer/variable.py", line 54, in __init__
    assert isinstance(data, (numpy.ndarray, cuda.ndarray))
AssertionError

======================================================================
FAIL: test_insource (test_packer.NNpackerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/xxxx/work/xchainer/tests/test_packer.py", line 50, in test_insource
    entryDatas = self.nnp.insource(datasets)
  File "xchainer/packer.py", line 36, in insource
    entries = [{ep: Variable(datasets[ep])} for ep in self.entryPoints]
  File "/home/xxxx/work/chainer/local/lib/python2.7/site-packages/chainer/variable.py", line 54, in __init__
    assert isinstance(data, (numpy.ndarray, cuda.ndarray))
AssertionError

======================================================================
FAIL: test_outsource (test_packer.NNpackerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/xxxx/work/xchainer/tests/test_packer.py", line 58, in test_outsource
    childrenOutput = self.nnp.outsource(datasets, False)
  File "xchainer/packer.py", line 41, in outsource
    chldOut = [{chn: ch.execute(datasets, train)} for chn, ch in chld]
  File "xchainer/packer.py", line 28, in execute
    self.entryDatas = self.insource(datasets)
  File "xchainer/packer.py", line 37, in insource
    entries = [{ep: Variable(datasets[ep])} for ep in self.entryPoints]
  File "/home/xxxx/work/chainer/local/lib/python2.7/site-packages/chainer/variable.py", line 54, in __init__
    assert isinstance(data, (numpy.ndarray, cuda.ndarray))
AssertionError

----------------------------------------------------------------------

tanabata-kitajima avatar Nov 12 '15 04:11 tanabata-kitajima

@orihime-akami ご報告ありがとうございます。 申し訳ありませんが、こちら、手元にGPU環境がないため確認できておりません。

masterへのmergeは

  1. こちらでGPU検証環境でちゃんと確かめられる
  2. chainerのバージョンアップが落ち着く の2点が達成できた時点で進めさせていただこうと考えております。 ご不便をおかけしますが、何卒ご了承ください。

NaOsugi1987 avatar Nov 12 '15 04:11 NaOsugi1987