aws / studio-lab-examples

Example notebooks for working with SageMaker Studio Lab. Sign up for an account at the link below!
https://studiolab.sagemaker.aws
Apache License 2.0
648 stars 193 forks source link

File Load Error for .gitignore #204

Closed pproe closed 1 year ago

pproe commented 1 year ago

Describe the bug

Sagemaker Studio Lab can't seem to load my gitignore file. The repository I am working on is https://github.com/pproe/spiral-galaxies. As you can see, .gitignore exists in the root directory, but when clicking Git > open .gitignore via the toolbar, Studio Lab presents the error "File Load Error for .gitignore file or directory '/spiral-galaxies/.gitignore' does not exist".

To Reproduce

Steps to reproduce the behavior:

  1. Open a git repository in Studio Lab.
  2. Click on 'Git' in toolbar menu.
  3. Click on 'open .gitignore'.
  4. See error

Expected behavior

Studio Lab should open up my .gitignore file.

Screenshots

File Load Error
Error displayed when attempting to open .gitignore
image
Proof .gitignore file does exist in directory

Desktop:

Additional context

A workaround is simply accessing the .gitignore file via nano or vim in the terminal. However, this is not ideal as it goes against the core premise of Studio Lab being a beginner-friendly entry point for machine learning beginners.

Simplified workaround for others coming across this problem:

  1. Click 'New Launcher' button (big button on top left or press 'Ctrl + Shift + L')

  2. Under 'Other' select the 'Terminal' option.

  3. In your terminal type nano .gitignore.

  4. Make changes to your gitignore file.

  5. When finished editing, press 'Ctrl + X', then 'Y', then 'Enter'.

icoxfog417 commented 1 year ago

Dear @pproe , thank you for raising the issue and using the Studio Lab for your repository! We confirmed that .gitignore can not open. We will investigate this problem.

As you said, we can edit .gitignore by nano. Or else, we can open it by double click if you show the hidden file.

image

  1. Settings > Advanced Settings > File Browser > check the Show hidden files
  2. Generate the setting file by jupyter server --generate-config
  3. Edit generated home/studio-lab-user/.jupyter/jupyter_server_config.py.
    • Write c.ContentsManager.allow_hidden = True. We can search c.ContentsManager by F6 key in nano editor.
  4. Restart the Jupyter Server

Reference: Jupyter Lab / Working with Files

icoxfog417 commented 1 year ago

Dear @pproe , we have now fixed this issue. Thank you for your contribution!