Closed AndPotap closed 3 years ago
This notebook appears to have been rerun (generating new outputs). Would it be possible to just change the relevant line?
Hi!
I avoided re-running the notebook and tried to change only one line. If you compare the two notebooks below they have the same output! Although, I'm not sure if I messed something up when committing...
https://github.com/AndPotap/neurips_bdl_starter_kit/blob/main/getting_started_pytorch.ipynb
https://github.com/izmailovpavel/neurips_bdl_starter_kit/blob/main/getting_started_pytorch.ipynb
Where do you see that new outputs have been generated? Is it because many lines have been changed or how can I see that? Sorry if this is a basic questions but tracking changes in Jupyter Notebook is hard!
I'm not exactly sure what happened but this commit seems to show that there are some extraneous changes. For example, the section at the beginning that says:
"nbformat": 4,
"nbformat_minor": 0,
is no longer there after the commit.
Hi @sharadmv, Those metadata tags are there at the bottom on the commit. Line 847-873.
@AndPotap It is very difficult to compare diff with notebooks. One thing that may help here is to revert it to old state and change only "onp" -> "np", save and commit it without running the notebook. In this case, we are be sure that this code will work.
Hi @v-i-s-h, yes that is exactly what I did (go directly to the line, change it and avoid running the notebook - I don't have a Tesla T4 GPU, so I could not have generated the nvidia-smi print). I think that even opening the notebook, changing just one word onp -> np and then saving it changes the metadata of the notebook.
What I could try to do is to open the code of the jupyter notebook and try to change that single line. This might be the best way forward to avoid any sorts of confusions!
Hi @AndPotap, I thought it could help. Previously it worked for me. Sorry for the confusing suggestion.
@v-i-s-h, no thanks for the suggestion, but Jupyter Notebooks behave unexpectedly!
I think you could open the notebook in a text editor and look for the relevant line in the JSON. Editing it there would only change that line.
@sharadmv That is what I did. I added another pull request. This one is closed.
In the PyTorch notebook when saving the submission numpy is called via onp while in this notebook it is loaded as np. This might be a mistake from copy pasting the JAX code (where numpy is called via onp in that notebook).
I only changed this line to avoid changing the output prints.