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

Inference code - no attribute named dataset kind #1

Open
dikshyam opened this issue Dec 28, 2022 · 1 comment
Open

Inference code - no attribute named dataset kind #1

dikshyam opened this issue Dec 28, 2022 · 1 comment

Comments

@dikshyam
Copy link

Hi - after downloading the pn_bert_cofe model files and saving it in the conf>models folder, I tried running the following command:
python run_eval.py --exp_name pn_bert_cofe --gpu 0
I run into the following issue:
device: CPU
Data 'TST' loading ...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1814/1814 [00:05<00:00, 355.12it/s]
Load -1 -> '/workspaces/CofeNet/conf/models/pn_bert_cofe/param/model_6000.bin' ..
Traceback (most recent call last):
File "/workspaces/CofeNet/run_eval.py", line 29, in
ret = Executor.format_result(mod.eval_dataset_tst(), markdown_table=True)
File "/workspaces/CofeNet/exe/executor.py", line 238, in eval_dataset_tst
return self.eval_dataset(self.data_tst, batch_size, beam_width)
File "/workspaces/CofeNet/exe/executor.py", line 104, in eval_dataset
preds, labels = self.get_preds_trues(dataset, batch_size, beam_width)
File "/workspaces/CofeNet/exe/executor.py", line 60, in get_preds_trues
for batch_data, _, lbstrss in dataloder:
File "/workspaces/CofeNet/data/loader.py", line 71, in iter
return _MYSingleProcessDataLoaderIter(self)
File "/workspaces/CofeNet/data/loader.py", line 48, in init
super(_MYSingleProcessDataLoaderIter, self).init(loader)
File "/workspaces/CofeNet/data/loader.py", line 20, in init
self.dataset_kind = loader.dataset_kind
AttributeError: 'SingleDataLoader' object has no attribute 'dataset_kind'. Did you mean: '_dataset_kind'?

I changed this - self.dataset_kind = "" - and it seems to be running now. Am I missing something here?

@keshuichonglx
Copy link
Collaborator

Sorry I didn't reproduce the problem you mentioned. Please confirm whether your operating environment is Python version==3.7. And use pip install -r requirements.txt command to install dependent packages.

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