facebookarchive / tutorials

Caffe2 Tutorials
Apache License 2.0
124 stars 60 forks source link

No handlers - MINST tutorial error - maybe related to lmdb #7

Closed CarlosYeverino closed 5 years ago

CarlosYeverino commented 6 years ago

It seems that reported error is related to lmdb. I compiled pythorch setting -DUSE_LMDB=ON in build_windows.bat, however the compiler did not recognize it and console output showed USE_LMDB=OFF during compilation. How can I fix the issue below?

My configuration: Windows 10 Python 2.7 Pythorch built from source I used pip and NOT anaconda

Python Output: Necessities imported! lmdb train db found! lmdb test db found! Looks like you ran this before, so we need to cleanup those old files... training data folder:C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist workspace root folder:C:\Users\Carlos\caffe2_notebooks\tutorial_files\tutorial_mnist train_model.net.Proto()

name: "mnist_train" op { input: "dbreader_C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb" output: "data_uint8" output: "label" name: "" type: "TensorProtosDBInput" arg { name: "batch_size" i: 64 } } op { input: "data_uint8" output: "data" name: "" type: "Cast" arg { name: "to" i: 1 } } op { input: "data" output: "data" ...

train_model.param_init_net.Proto()

name: "mnist_train_init" op { output: "dbreader_C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb" name: "" type: "CreateDB" arg { name: "db_type" s: "lmdb" } arg { name: "db" s: "C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb" } } op { output: "conv1_w" name: "" type: "XavierFill" arg { name ... No handlers could be found for logger "caffe2.python.workspace"

Traceback (most recent call last): File "D:\Yeverino\Python_scripts\minst_caffe2_tutorial\1.py", line 254, in workspace.RunNetOnce(train_model.param_init_net) File "D:\Yeverino\git_projects\pytorch\build\caffe2\python\workspace.py", line 199, in RunNetOnce StringifyProto(net), File "D:\Yeverino\gitprojects\pytorch\build\caffe2\python\workspace.py", line 178, in CallWithExceptionIntercept return func(*args, **kwargs) RuntimeError: [enforce fail at db.h:190] db. Cannot open db: C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb of type lmdb Error from operator: output: "dbreader_C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb" name: "" type: "CreateDB" arg { name: "db_type" s: "lmdb" } arg { name: "db" s: "C:\Users\Carlos\caffe2_notebooks\tutorial_data\mnist\mnist-train-nchw-lmdb" }

I checked manually and both lmdb exist (mnist-test-nchw-lmdb and mnist-train-nchw-lmdb) and they contain the data and lock .mdb files

CarlosYeverino commented 5 years ago

Related issue stated in https://github.com/pytorch/pytorch/issues/9736

orionr commented 5 years ago

Replied on pytorch/pytorch - closing.