C2W1_Unable to split data

Hi Om,

To troubleshoot a programming problem, I find it useful to have a simple case that I can examine quickly. Since this function is more of a Python programming exercise, I recommend these steps:

  1. Start a new blank notebook in https://colab.research.google.com/
  2. Copy that function there
  3. Create three directories in your workspace: a source directory, training directory, validation directory
  4. Upload 10 pictures to the source directory
  5. Have a unit test under that function. So you can just run it every time you modify something in the function.

This is what the initial setup will look like:

Once it’s behaving as expected in this setup. Look back at your assignment solution again and see if you’re applying the same logic. This looks rigorous but I think the experience you’ll get will help in troubleshooting other problems. This course is mainly aimed at developers so you will have to be comfortable with examining bugs in your code.

If you’re finding it difficult to make it work on a small example, I recommend brushing up on Python skills first so you’ll be better prepared for the rest of the course. You can search for particular techniques like “how to copy files to another directory” or paste your error messages so you’ll know what they mean.

Since you mentioned that you want to improve your Python skills, I recommend looking at this curated list by Raymond.

Hope these help.

1 Like