Closed Haebuk closed 3 years ago
Jason's solution will also fix your problem:
https://github.com/full-stack-deep-learning/fsdl-text-recognizer-2021-labs/issues/15
@burgikukac Hi, Thanks for your comment, but I have a additional question. Could I add the fix codes in every lab/util.py?
I've run the code for lab1 and lecture2 in colab and get a HTTP Error 503: Service Unavailable. I found a fact that download page http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz was closed. So I can't access the data. how can I fix it?
here is some code: paths: ['/content/FSDL-2021-futureskill/lab2/training', '/content/FSDL-2021-futureskill/lab2', '/content/FSDL-2021-futureskill/lab2/$PYTHONPATH', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.7/dist-packages/IPython/extensions', '/content/FSDL-2021-futureskill/lab2'] /usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/distributed.py:49: UserWarning: You have set progress_bar_refresh_rate < 20 on Google Colab. This may crash. Consider using progress_bar_refresh_rate >= 20 in Trainer. warnings.warn(*args, kwargs) GPU available: True, used: True TPU available: None, using: 0 TPU cores LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0] Downloading http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz to /content/FSDL-2021-futureskill/data/downloaded/MNIST/raw/train-images-idx3-ubyte.gz 0it [00:00, ?it/s]Traceback (most recent call last): File "training/run_experiment.py", line 96, in
main()
File "training/run_experiment.py", line 89, in main
trainer.tune(lit_model, datamodule=data) # If passing --auto_lr_find, this will set learning rate
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/trainer.py", line 851, in tune
self.tuner.tune(model, train_dataloader, val_dataloaders, datamodule)
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/tuner/tuning.py", line 40, in tune
self.trainer.data_connector.prepare_data(model)
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 59, in prepare_data
self.trainer.datamodule.prepare_data()
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
return fn(*args, *kwargs)
File "/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/distributed.py", line 39, in wrapped_fn
return fn(args, kwargs)
File "/content/FSDL-2021-futureskill/lab2/text_recognizer/data/mnist.py", line 29, in prepare_data
TorchMNIST(self.data_dir, train=True, download=True)
File "/usr/local/lib/python3.7/dist-packages/torchvision/datasets/mnist.py", line 79, in init
self.download()
File "/usr/local/lib/python3.7/dist-packages/torchvision/datasets/mnist.py", line 146, in download
download_and_extract_archive(url, download_root=self.raw_folder, filename=filename, md5=md5)
File "/usr/local/lib/python3.7/dist-packages/torchvision/datasets/utils.py", line 256, in download_and_extract_archive
download_url(url, download_root, filename, md5)
File "/usr/local/lib/python3.7/dist-packages/torchvision/datasets/utils.py", line 84, in download_url
raise e
File "/usr/local/lib/python3.7/dist-packages/torchvision/datasets/utils.py", line 72, in download_url
reporthook=gen_bar_updater()
File "/usr/lib/python3.7/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(args)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(args)
File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable
0it [00:00, ?it/s]