dec icon indicating copy to clipboard operation
dec copied to clipboard

leveldb iterator is invalid

Open yalesong opened this issue 7 years ago • 5 comments

Running an experiment with reutersidf10k dataset via python dec.py reutersidf10k fails with an error

I0721 18:03:54.192920 24690 net.cpp:67] Creating Layer data
I0721 18:03:54.192975 24690 net.cpp:358] data -> data
I0721 18:03:54.193002 24690 net.cpp:96] Setting up data
I0721 18:03:54.193032 24690 data_layer.cpp:45] Opening leveldb reutersidf10k_total
python: db_iter.cc:68: virtual leveldb::Slice leveldb::<unnamed>::DBIter::value() const: Assertion `valid_' failed.

The same error occurs with the mnist and the reutersidf datasets. I haven't tried with the stl dataset.

I compiled the Caffe library provided in this repo, downloaded the dataset, and ran python make_reuters_data.py as given in the instruction.

The error happens when iter_->value() is called in: https://github.com/piiswrong/dec/blob/master/caffe/src/caffe/layers/data_layer.cpp#L122

It seems https://github.com/piiswrong/dec/blob/master/caffe/src/caffe/layers/data_layer.cpp#L53 creates an invalid iterator; putting a line CHECK(iter->Valid()) immediately after it fails.

My leveldb version is 1.0.7

yalesong avatar Jul 21 '16 18:07 yalesong