I understand that we need to upload both the notebook and the history pkl file. However, I’ve been able to pip install google.colab. It seems to have a problem with pandas in particular.
Could you please explain the need for pandas
?
I don’t need pandas. However, every time I try to install google.colab, it fails because it can’t install pandas. And that causes my assignment to fail because I need not the notebook, but also the .pkl file for history for the course.
Here’s the relevant code in Course 2 Week 1 that I’m stuck at for the time being:
def download_history():
import pickle
from google.colab import files
with open('history.pkl', 'wb') as f: pickle.dump(history.history, f)
files.download('history.pkl')
Are you using google colab or your personal computer?
I’m using my personal computer.
pickle
is bundled with python.
Use this snippet please:
import pickle
with open('history.pkl', 'wb') as f:
pickle.dump(history.history, f)
That’s included with the code snippet. I understand that it will give me the history.pkl
. What I don’t understand is the files.download('history.pkl')
.
That’s also an issue as the instructions state that I need to upload the notebook and the history.pkl
file. I don’t know where to upload it to.
The staff want you to do the asssignment on google colab environment which includes the colab libraries for you to download the history pickle file.
In your case, the assignment was done on a local computer which doesn’t have / need colab module to download the history pickle file.
Please do the following:
- Use the snippet I gave you in the previous post on a new cell and save the
history.pkl
file. - Remove this cell since this is not part of the assignment starter code.
- Save the notebook for jupyter to checkpoint the changes.
- Upload the notebook and the pickle files to the grader from your machine.
On the assignment page on coursera, click on My submissions
and then create submission
to upload the notebook and history file:
Step 1:
Step 2:
Thank you @balaji.ambresh, that definitely help. I will check over my work and then upload it via the `My submissions’ tab.
Sure. Don’t forget to click the Submit
button after uploading the files.
I won’t, I promise.