Downloading the full lab (including data)

Hi,

In previous specialisations I studied on Coursera, there was always some guidance around downloading the labs. This is the first one I’ve done on DeepLearning.AI and I haven’t come across such guidance in any of the modules. Further, I can’t find a way to do it without having to download the contents of each folder separately, which for some labs, is extremely difficult and time-consuming.

Are the labs in this course not download-friendly? Is there a way I can download all the lab files - including the data folders - in one shot?

Hi @tnabil,

Unfortunately, this feature is not yet available on the Learning Platform.

Regards,
Mubsi

No worries, thanks.

Well, if you know how to use linux commands, you can implement this yourself. Just add a cell to the notebook (the “+” on the toolbar) and then you can include linux shell commands by using so-called “bang escapes”: just precede each shell command with an exclamation point “!” (bang).

Try this:

!pwd
!ls -lR

That will show your current working directory and recursively list the files in the assignment. I tried and they don’t include the zip command in the Docker image, but they do include tar. For example you could add this command:

!tar chzvf assignment.tgz .

That will give you a compressed tar file with all the files recursively included. Then you just download that and then unpack it locally.

To unpack the file (if you are in a linux or other Unix flavored environment) you would do this with a directory name of your own choosing of course:

mkdir PyTorch_C1_M3
cd PyTorch_C1_M3
tar xzvf ../assignment.tgz

Please don’t forget the h flag. Consider smaller tar files if your internet connection isn’t reliable.

That’s an excellent point about using h that I always seem to forget. I have added that in my previous post. Thanks!

@paulinpaloalto That’s a billiant idea! I didn’t know you could run Linux commands in Jupyter notebooks. Works like a charm. Thanks!

That’s great that you were able to take advantage of that idea. It’s a good tool to have in the toolbox for the future. In some versions of the Jupyter Notebooks, there’s a way to get a terminal window with a linux shell, which is a bit easier to use. But it looks like in the PyTorch course they are using Jupyter Labs, which (as far as I’ve been able to figure out so far) do not include the terminal window feature. In the Coursera version of DLS (e.g.), it’s easy to find that from the “File Explorer” menu accessed from the notebook by “File -> Open”.