Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmdb.Error: datasets/clean_10k_geography/train.lmdb: No such file or directory #5

Open
AIHECKER opened this issue Mar 13, 2024 · 4 comments

Comments

@AIHECKER
Copy link

I got the same problem in Seco's source code.
I thought the author probably sovled this, so I'm here asking for help!

@utkarshmall13
Copy link
Owner

Hi, can you also post the command (with argument) and model you are trying to run? I was getting this error but was able to resolve it but I don't remember exactly when I was getting it.

@AIHECKER
Copy link
Author

Hi, can you also post the command (with argument) and model you are trying to run? I was getting this error but was able to resolve it but I don't remember exactly when I was getting it.

Thanks for replying. I was running the main_pretrain.py using this command:
python3 main_pretrain.py --data_dir datasets/clean_10k_geography/ --base_encoder resnet18 --batch_size 256 --data_mode caco --max_epochs 1000 --schedule 600 800 -d gereric_description --online_data_dir datasets/clean_10k_geography/

I added the new argument --online data_dir which you didn't put it on in your original command because the program couldn't go on without this.

And the complete error message wrote like this:
(cacoenv) u2021213473@n1:~/jupyterlab/seasonal-contrast-main$ python3 main_pretrain.py --data_dir datasets/clean_10k_geography/ --base_encoder resnet18 --batch_size 256 --data_mode caco --max_epochs 1000 --schedule 600 800 -d gereric_description --online_data_dir datasets/clean_10k_geography/
{'min_q': {'B2': 3.0, 'B3': 2.0, 'B4': 0.0}, 'max_q': {'B2': 88.0, 'B3': 103.0, 'B4': 129.0}}
Traceback (most recent call last):
File "/home/u2021213473/jupyterlab/seasonal-contrast-main/main_pretrain.py", line 89, in
online_evaluator = SSLOnlineEvaluator(
File "/home/u2021213473/jupyterlab/seasonal-contrast-main/models/ssl_online.py", line 25, in init
self.datamodule.setup()
File "/home/u2021213473/.local/lib/python3.9/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
return fn(*args, **kwargs)
File "/home/u2021213473/jupyterlab/seasonal-contrast-main/datasets/bigearthnet_datamodule.py", line 36, in setup
self.train_dataset = LMDBDataset(
File "/home/u2021213473/jupyterlab/seasonal-contrast-main/utils/data.py", line 91, in init
self.env = lmdb.open(lmdb_file, max_readers=1, readonly=True, lock=False, readahead=False, meminit=False)
lmdb.Error: datasets/clean_10k_geography/train.lmdb: No such file or directory

@utkarshmall13
Copy link
Owner

Sorry, dropped the ball on this one. Were you able to figure it out? I think the --online_data_dir is the culprit as the lmdb version of data is needed for that.

@AIHECKER
Copy link
Author

AIHECKER commented Apr 4, 2024

Sorry, dropped the ball on this one. Were you able to figure it out? I think the --online_data_dir is the culprit as the lmdb version of data is needed for that.

Thanks for the heads-up. I took a look at the models/ssl_online.py file and noticed that a return statement is executed right before the self.datamodule section. This is a change from the original SECO code. (You must have figured this out.) So, problem solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants