Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving to GitHub #1975

Open
vijaychsk opened this issue Apr 22, 2021 · 4 comments
Open

Saving to GitHub #1975

vijaychsk opened this issue Apr 22, 2021 · 4 comments

Comments

@vijaychsk
Copy link

vijaychsk commented Apr 22, 2021

Bug report for Colab: http://colab.research.google.com/.

Issue:
I opened a notebook that belongs to someone else. I tried to save a copy of it to my GitHub repository. But it is not working. The save fails because the Colab is trying to save it in the source where I don't have write access.

Error Snippet:
Failed to save notebook to https://github.com/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb CustomError: Failed to save notebook to https://github.com/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb at new JA (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:1389:22) at za.program_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:1395:315) at Ba (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:19:336) at za.throw_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:18:403) at Ca.throw (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:20:248) at g (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:62:155)

Expected behavior:
When the "Save a copy in GitHub" is clicked, Colab should show me the repositories, where users have write access to save a copy. If not, I should be able to input the repository path to save. Instead of showing the source repository.

Steps to reproduce:

  1. Open this link: https://colab.research.google.com/github/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb
  2. File > Save a copy to GitHub
  3. You'll not see your public/private repository to choose to save.

Browser Used:

  • Chrome

NOTES:

  • My repository where I want to save is public. I can give access to Colab to write into my repository. However, as explained above, I don't have an option to select the repository to save.
@UmerFakher
Copy link

UmerFakher commented May 4, 2021

I have re-created this issue. Whenever I "Save a copy to GitHub" it seems the problem is that it doesn't not change the name in this variable in the code that you can only see if you view the jupyter notebook code in RAW. However, the name of the file can appear to be different in reality.

I had a notebook "Original.ipynb" in my GitHub repo. I opened this in Google Colab. "Save a copy to GitHub". I changed the name to "Different_Copy.ipynb". I checked the box "Include a link to Colaboratory" as well for a test.

When I try to open "Different_Copy.ipynb" in Colab after that it opens "Original.ipynb" the "Save a copy to GitHub" seems to not change this name variable.

For example this notebook in GitHub appears to be called "Different_Copy.ipynb" but when viewed in RAW you can see the "name": "Original.ipynb".

"colab": {
  "name": "Original.ipynb",
  "provenance": [],
  "include_colab_link": true
},

It seems that when you open "Different_Copy.ipynb" in Colab it opens "Original.ipynb" instead. Also when I click the link at the top generated from "Include a link to Colaboratory".

This means you have to manually change the name variable in the notebook code to view it in Colab if it has been copied from another notebook through "Save a copy to GitHub"

It will open the original notebook not the one you want to open.
Note that this "name": "Original.ipynb" is not the same as the name of the notebook. It is an attribute from the code that Colab adds to your jupyter notebook. As you can see here:

"colab": {
  "name": "Original.ipynb",
  ....
},

Also when you rename the notebook it doesn't change this "name" either.

I hope this can be fixed as it very tedious to copy notebook for Colab and prevents access.

@cperry-goog
Copy link

Bug in our Github support.

@DimaUd
Copy link

DimaUd commented Dec 23, 2021

Hello, maybe someone can help Litz
I'm trying to save colab notebook in github publice repositiry and I get an error message, when I download one line everything is fine when I add then a message will appear again.
I did not see that there is a limit on the number of rows, I would be happy to help
https://github.com/DimaUd/Heart-Attack/blob/main/Heart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants