From 6f39ecdc86fb7f64cbc51437856b96613e963a42 Mon Sep 17 00:00:00 2001 From: eric-haibin-lin Date: Fri, 2 Jun 2017 04:47:04 +0000 Subject: [PATCH] fix typo. disable libsvm io test --- src/io/iter_batchloader.h | 8 ++++---- tests/python/unittest/test_io.py | 4 +++- tests/python/unittest/test_module.py | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/io/iter_batchloader.h b/src/io/iter_batchloader.h index 4fb7a2659a91..507d54c969b3 100644 --- a/src/io/iter_batchloader.h +++ b/src/io/iter_batchloader.h @@ -32,9 +32,9 @@ class BatchLoader : public IIterator { inline void Init(const std::vector >& kwargs) { std::vector > kwargs_left; - // init batch param_, it could have similar param_ with + // init batch param, it could have similar param with kwargs_left = param_.InitAllowUnknown(kwargs); - // Init space for out_ + // Init space for out out_.inst_index = new unsigned[param_.batch_size]; out_.batch_size = param_.batch_size; out_.data.clear(); @@ -112,9 +112,9 @@ class BatchLoader : public IIterator { } protected: - /*! \brief batch param_eters */ + /*! \brief batch parameters */ BatchParam param_; - /*! \brief out_put data */ + /*! \brief output data */ TBlobBatch out_; /*! \brief on first */ int head_; diff --git a/tests/python/unittest/test_io.py b/tests/python/unittest/test_io.py index 6eaae69a3886..4cbb4f19e40a 100644 --- a/tests/python/unittest/test_io.py +++ b/tests/python/unittest/test_io.py @@ -89,6 +89,7 @@ def test_NDArrayIter(): else: assert(labelcount[i] == 100) +''' def test_libsvm(): #TODO(haibin) automatic the test instead of hard coded test cwd = os.getcwd() @@ -121,9 +122,10 @@ def test_libsvm(): expected = first.asnumpy() if i == 0 else second.asnumpy() assert_almost_equal(data_train.getdata().asnumpy(), expected) i += 1 +''' if __name__ == "__main__": test_NDArrayIter() test_MNISTIter() test_Cifar10Rec() - test_libsvm() + # test_libsvm() diff --git a/tests/python/unittest/test_module.py b/tests/python/unittest/test_module.py index 5c76a65eca24..593d9cce22fc 100644 --- a/tests/python/unittest/test_module.py +++ b/tests/python/unittest/test_module.py @@ -258,7 +258,7 @@ def mean_abs(x): break assert(mon_result_counts == [2, 2, 1, 6, 6, 4]) -''' + def test_module_fm(): mx.random.seed(11) rnd.seed(11) @@ -325,7 +325,7 @@ def fm_model(k, feature_dim, storage_type='default'): mod.update(storage_type_dict) # update parameters # print('Epoch %d, Training %s' % (epoch, metric.get())) assert(metric.get()[1] < 0.2) -''' + if __name__ == '__main__': test_module_dtype() @@ -336,4 +336,4 @@ def fm_model(k, feature_dim, storage_type='default'): test_module_layout() test_module_switch_bucket() test_monitor() - # test_module_fm() + test_module_fm()