Publish a requirements.txt file for local experimentation

I tend to have trust issues with content hosted on remote sites and often tend to download the assignments to my computer when experimenting.

would it be possible to make a pip freeze file available for the different assignments. I spent maybe two hours wondering why my tests didn’t pass, and then I realised that I might be running a too recent TF version. This way slicing a keras tensor like this X[:,1,:] actually results in a ['TensorFlowOpLayer', [(None, 90)], 0] instead of a ['SlicingOpLambda', (None, 90), 0] like the unit test expected.

I think the requirements file would have saved me about an hour of questioning what I have been doing with my life. It might help other students as well.

Edit: This is specifically under assignment w1a3 (exercise 1: djmodel)

Hi @ganderson,

Getting the requirements.txt file is a good idea.

Could you try opening a terminal from the notebook and run pip freeze in it and see what you get? That might be enough.

You can download the resulting file using the notebook menus.

Let me know if that works or if you get stuck.

Best,

Petri

One more thing: you can check the tensor flow version by running tf.__version__ in a notebook cell. Compare that with the version you run locally.

Petri

The course is intended to be run online. I don’t think DLAI or Coursera are interested in making the course easy to export to other platforms.

snap! I didn’t think that I could access pip from the notebook itself.

This actually solved my local problems. Thanks for the tip!

tf.__version__ was also a viable option.

That may be true, and I see your point. The main audience might not have access to their own computer at all times, but this could help a minority of the community.

From what I could see in some of the other questions asked here in the community: There are some students that have lost all their work because the server-side had reset all the progress due to an overdue deadline.

I, myself, have experienced the loss of a couple of lines by forgetting to hit the save-button before going on lunch (and then Coursera closed my session). This wouldn’t be the case when having access to the content on a local computer.

Thank you for humoring my idea. It could be enough to add a line saying that students can replicate the coursera environment by installing the same versions. Versions are found by typing pip freeze in one of the notebook cells and executing it.