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

Colab interface for notebooks #71

Merged
merged 12 commits into from
May 26, 2023
Merged

Colab interface for notebooks #71

merged 12 commits into from
May 26, 2023

Conversation

EnricoTrizio
Copy link
Collaborator

@EnricoTrizio EnricoTrizio commented May 24, 2023

Description

Add the possibility to open the notebooks in Colab.
Adds:

  • colab_setup.sh file to setup the colab environments and store the data for the notebooks (both tutorials and paper experiments)
  • Setup code for colab in the import cell of notebooks

If os detects that we are in colab it downloads and runs the colab_setup.sh

Questions

  • Check if the workflow is fine
  • Try to run some of them on Colab and give feedbacks

TODO

  • Change paths in the colab setup code and buttos to use the main branch before merging

Status

  • Ready to go

@EnricoTrizio EnricoTrizio added documentation Improvements or additions to documentation enhancement New feature or request labels May 24, 2023
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #71 (47869d5) into main (3f8f644) will not change coverage.
The diff coverage is n/a.

@luigibonati
Copy link
Owner

nice!
just a couple of minor things:

  • I would replace: chmod +x ./colab_setup.sh && ./colab_setup.sh with just bash colab_setup.sh
  • can we make it slightly more verbose? i see in the colab_setup.sh file there are echos but they are not displayed

@EnricoTrizio
Copy link
Collaborator Author

EnricoTrizio commented May 25, 2023

nice! just a couple of minor things:

  • I would replace: chmod +x ./colab_setup.sh && ./colab_setup.sh with just bash colab_setup.sh

Yep I'll do that

  • can we make it slightly more verbose? i see in the colab_setup.sh file there are echos but they are not displayed

With subprocess you can store the output and print everything at the only for what I've seen, which is pretty useless..
It would be something like

result = subprocess.run('bash ./colab_setup.sh', shell=True, stdout=subprocess.PIPE)
print(result.stdout.decode('utf-8'))

Otherwise we can use !cmd syntax and it prints everything as from terminal

@EnricoTrizio EnricoTrizio merged commit afb8ab6 into main May 26, 2023
12 checks passed
@EnricoTrizio EnricoTrizio deleted the colab_setup branch May 29, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants