Hi deeplearning.ai team,
I would like to reset the Jupyter notebook file from Module 3, C1M3 assignment to its original state, but unfortunately, I am unable to do so following these instructions: How to Get a Clean Copy of an Assignment Notebook
I have opened an issue on this topic on the github page of the course with high priority, as it looks like the procedure has been changed (the ‘Help’ button appears to be missing).
Thank you for the information. Can the file be restored to its original state from your end?
If not, please send me the original part from Exercise 1:
*“”"
Generates a research report using OpenAI’s tool-calling with arXiv and Tavily tools.
Args:
prompt (str): The user prompt.
model (str): OpenAI model name.
Returns:
str: Final assistant research report text.
“”"
“auto” = [
{
“role”: “system”,
“content”: (*
I think I accidentally inserted “auto” into the section of code that should not be changed.
Unfortunately, mentors cannot restore the file for you. Someone at the backend will have to pick this up. Usually, when an issue on github is marked as high priority, it is picked up pretty quickly. I have added a link to this topic.
If this course uses Jupyter Labs (rather than Jupyter Notebooks), then this brute-force procedure to get a new copy of the notebook might (or might not) work:
Delete your current notebook (using the File menu).
Wait several hours (at least two). Do not attempt to access the lab during this time.
This causes your lab session to expire (time-out), and then when you next visit the lab, a new copy of the notebook will be provided.
I have not tried this yet myself, but that’s what I gathered from some other discussions.
Note that if you visit the lab before it times-out, it will reset the timer, and you won’t get a new copy.
If that’s the only place, then change "auto" = [ to messages =[.
If there are any other unintentional change, I would suggest you to try the steps in @TMosh’s post. I am going to try it myself, too, but I suggest to download your current notebook before deleting it, so you can upload it back later with a different name and copy your work over.
While we are waiting for a good way to restore lab file, for future assignments, before we make changes to it, as a precaution, we might use the “Make a copy” feature to get us a backup file ourselves. After that, you will be in the copied file, then you need to click “File” > “Open” to go back to the original file.
“File” > “Download as” > “Notebook”, then save it in my computer.
“File” > “Rename”, then give it a new name.
Close the lab.
Back after 30 minutes, open the lab, and I have a new file.
Step 1 is for precaution and is recommended. Step 2 avoids deleting my original file. The waiting time (30 minutes here) was just one trial, and I don’t know the exact, official minimum waiting time.
Raymond
PS1: Agentic AI uses Jupyter Notebook environment.
PS2: This trial was done on the deeplearning.ai learning platform.
Is this the most up-to-date information on resetting a notebook?
On renaming:
Traceback (most recent call last): File “/usr/local/lib/python3.8/site-packages/tornado/web.py”, line 1790, in _execute result = await result File “/usr/local/lib/python3.8/site-packages/tornado/gen.py”, line 233, in wrapper yielded = ctx_run(next, result) File “/usr/local/lib/python3.8/site-packages/notebook/services/contents/handlers.py”, line 135, in patch model = yield maybe_future(cm.update(model, path)) File “/usr/local/lib/python3.8/site-packages/notebook/services/contents/manager.py”, line 296, in update self.rename(path, new_path) File “/usr/local/lib/python3.8/site-packages/notebook/services/contents/manager.py”, line 284, in rename self.rename_file(old_path, new_path) File “/usr/local/lib/python3.8/site-packages/notebook/services/contents/filemanager.py”, line 579, in rename_file raise web.HTTPError(400, f’Cannot rename file or directory {os_path!r}') NameError: name ‘os_path’ is not defined
try to always create a new topic instead of posting on older thread topics. you can always share the link similar to your issue
If you are working on deeplearning.ai platform, when you open lab, on top right corner you notice 3 dots, you will notice restore original version, click on it. you will have fresh copy of the notebook.