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

Create data dir #156

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tbarton16
Copy link

I get an error when I run the notebook. I cannot write file because this directory './data' does not exist. This pr fixes that. To reproduce the error you can run all the cells of the nb.

Screen Shot 2021-08-19 at 1 10 33 PM

I get an error when I run the notebook: cannot write file because this directory does not exist.
@sidgan
Copy link
Collaborator

sidgan commented Aug 19, 2021

Thank you @tbarton16! This notebook is particularly heavy as it not only downloads an entire dataset but also processes the data. Additionally, there are many notebooks that use the raw data so ideally, we would expect people to run it on their local machines, such that the data has to be downloaded only once. While running on Colab, we've mentioned instructions Note: In order to run this notebook on Google Colab you need to follow these instructions so that the local data such as the images are available in your Google Drive.

That being said, I do like your idea and would suggest a slight tweak to it - add a check to see if the data directory already exists and if not, then create it. That way the code will work seamlessly on colab and on a local machines. What do you think?

@tbarton16
Copy link
Author

Yes, I will edit it to check first, thanks for the feedback! I have noticed some other issues

  • there are 2 notebooks for chapter 4 part 1, (here and here) and the more recent one is not the one that comes up first from the textbook.
  • There is an issue where the number of filenames the generator finds is not equal to the number of images in the dataset, so that also raises an error.

I'm sure these errors will be fixed by running locally with photos on google drive, but if it would be helpful to have the pure colab version working seamlessly for colab pro users (like me) I would be happy to fix them and test the changes.

Screen Shot 2021-08-19 at 3 52 10 PM

@sidgan
Copy link
Collaborator

sidgan commented Aug 20, 2021 via email

@sidgan
Copy link
Collaborator

sidgan commented Aug 20, 2021 via email

@sidgan
Copy link
Collaborator

sidgan commented Aug 23, 2021

HI, @tbarton16 I've renamed the files correctly so you should be able to access them from within the book now.

Looking forward to your updated PR!

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

Successfully merging this pull request may close these issues.

2 participants