Skip to content

Commit

Permalink
fix typo. disable libsvm io test (apache#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-haibin-lin authored Jun 2, 2017
1 parent 3e486d5 commit 7c975a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/io/iter_batchloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class BatchLoader : public IIterator<TBlobBatch> {

inline void Init(const std::vector<std::pair<std::string, std::string> >& kwargs) {
std::vector<std::pair<std::string, std::string> > 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();
Expand Down Expand Up @@ -112,9 +112,9 @@ class BatchLoader : public IIterator<TBlobBatch> {
}

protected:
/*! \brief batch param_eters */
/*! \brief batch parameters */
BatchParam param_;
/*! \brief out_put data */
/*! \brief output data */
TBlobBatch out_;
/*! \brief on first */
int head_;
Expand Down
4 changes: 3 additions & 1 deletion tests/python/unittest/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
6 changes: 3 additions & 3 deletions tests/python/unittest/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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()

0 comments on commit 7c975a5

Please sign in to comment.