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

Lab 7: AttributeError: 'IAMParagraphs' object has no attribute 'data_test' #36

Open
InHouse-Banana opened this issue Jul 16, 2021 · 2 comments

Comments

@InHouse-Banana
Copy link

InHouse-Banana commented Jul 16, 2021

When running Lab 7

PYTHONPATH=. python training/run_experiment.py --wandb --gpus=-1 --data_class=IAMOriginalAndSyntheticParagraphs --model_class=ResnetTransformer --loss=transformer --batch_size=16 --check_val_every_n_epoch=10 --terminate_on_nan=1 --num_workers=32 --accelerator=ddp --lr=0.001 --accumulate_grad_batches=4 --max_epoch 1

I get the following error:

  File "/home/ubuntu/pytorch-lab/lab7_eds/text_recognizer/data/iam_original_and_synthetic_paragraphs.py", line 39, in setup
    self.data_test = self.iam_paragraphs.data_test
AttributeError: 'IAMParagraphs' object has no attribute 'data_test'

has anyone else seen it?

@Roger-Li
Copy link

Have you been able to follow along this lab? I tried to change this line into the following:

if stage == 'test' or stage is None:
    self.data_test = self.iam_paragraphs.data_test

@InHouse-Banana
Copy link
Author

InHouse-Banana commented Oct 1, 2021

Have you been able to follow along this lab?...
I think that I did, but I think that I didn't run with the option --data_class=IAMOriginalAndSyntheticParagraphs... what I can't really remember as it was a while ago.

Although I haven't tried your fix, I was thinking a fix along those lines when I encountered the error. Sadly, I never got around to a working solution. Hence, if it worked for you, I guess that it would for me as well. Hence, why don't you PR it?~

Thank you!

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