google-colaboratory

PyTorch Geometric CUDA installation issues on Google Colab

安稳与你 提交于 2020-05-13 05:14:33
问题 I was working on a PyTorch Geometric project using Google Colab for CUDA support. Since it's library isn't present by default, I run: !pip install --upgrade torch-scatter !pip install --upgrade torch-sparse !pip install --upgrade torch-cluster !pip install --upgrade torch-spline-conv !pip install torch-geometric Recently, while importing torch_geometric , owing to version upgrades, there's a CUDA version mismatch saying: RuntimeError: Detected that PyTorch and torch_sparse were compiled with

PyTorch Geometric CUDA installation issues on Google Colab

谁说胖子不能爱 提交于 2020-05-13 05:12:40
问题 I was working on a PyTorch Geometric project using Google Colab for CUDA support. Since it's library isn't present by default, I run: !pip install --upgrade torch-scatter !pip install --upgrade torch-sparse !pip install --upgrade torch-cluster !pip install --upgrade torch-spline-conv !pip install torch-geometric Recently, while importing torch_geometric , owing to version upgrades, there's a CUDA version mismatch saying: RuntimeError: Detected that PyTorch and torch_sparse were compiled with

Get a shareable link of a file in our google drive using Colab notebook

浪子不回头ぞ 提交于 2020-05-12 08:22:20
问题 could anyone please inform me how to automatically get a shareable link of a file in our google drive using Colab notebook? Thank you. 回答1: You can use xattr to get file_id from subprocess import getoutput from IPython.display import HTML from google.colab import drive drive.mount('/content/drive') # access drive # need to install xattr !apt-get install xattr > /dev/null # get the id fid = getoutput("xattr -p 'user.drive.id' '/content/drive/My Drive/Colab Notebooks/R.ipynb' ") # make a link

How to import plotly on Google Colab

半城伤御伤魂 提交于 2020-05-11 17:45:12
问题 Hi I was trying to import plotly on GoogleColab. I used the code import plotly.plotly as py import plotly.graph_objs as go and it returns ImportError: The plotly.plotly module is deprecated, please install the chart-studio package and use the chart_studio.plotly module instead. Can someone shed a bit light on this please? Thanks. 回答1: As the error says, try installing chart-sudio using: !pip install chart_studio Then import it like so: import chart_studio.plotly as py import plotly.graph_objs

How to import plotly on Google Colab

£可爱£侵袭症+ 提交于 2020-05-11 17:39:33
问题 Hi I was trying to import plotly on GoogleColab. I used the code import plotly.plotly as py import plotly.graph_objs as go and it returns ImportError: The plotly.plotly module is deprecated, please install the chart-studio package and use the chart_studio.plotly module instead. Can someone shed a bit light on this please? Thanks. 回答1: As the error says, try installing chart-sudio using: !pip install chart_studio Then import it like so: import chart_studio.plotly as py import plotly.graph_objs

How to import plotly on Google Colab

一世执手 提交于 2020-05-11 17:39:24
问题 Hi I was trying to import plotly on GoogleColab. I used the code import plotly.plotly as py import plotly.graph_objs as go and it returns ImportError: The plotly.plotly module is deprecated, please install the chart-studio package and use the chart_studio.plotly module instead. Can someone shed a bit light on this please? Thanks. 回答1: As the error says, try installing chart-sudio using: !pip install chart_studio Then import it like so: import chart_studio.plotly as py import plotly.graph_objs

Is there a way to make Colab give an Audio Notification when cell has finished running

試著忘記壹切 提交于 2020-05-11 05:22:43
问题 I am coding Neural Network models and trainings are long to run so I would like to go doing something else then go back as soon as the cell has finished running. There is already a way to track this since the Tab Icon is grey when busy then yellow when done. But I can't find something abut audio notifications. 回答1: Adding an audio notification when a cell completes is a two-liner. For example, # Play an audio beep. Any audio URL will do. from google.colab import output output.eval_js('new

How to import data from Google Cloud Storage to Google Colab

北慕城南 提交于 2020-05-10 18:41:18
问题 Currently I am working on a data set that is of 10 GB. I have uploaded it on google cloud storage but I don't know how to import it in google colab. 回答1: from google.colab import auth auth.authenticate_user() Once you run this, a link will be generated, you can click on it and get the signing in done. !echo "deb http://packages.cloud.google.com/apt gcsfuse-bionic main" > /etc/apt/sources.list.d/gcsfuse.list !curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - !apt -qq

How to import data from Google Cloud Storage to Google Colab

半世苍凉 提交于 2020-05-10 18:40:00
问题 Currently I am working on a data set that is of 10 GB. I have uploaded it on google cloud storage but I don't know how to import it in google colab. 回答1: from google.colab import auth auth.authenticate_user() Once you run this, a link will be generated, you can click on it and get the signing in done. !echo "deb http://packages.cloud.google.com/apt gcsfuse-bionic main" > /etc/apt/sources.list.d/gcsfuse.list !curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - !apt -qq

How can I ssh to google colaboratory VM?

倖福魔咒の 提交于 2020-05-10 04:30:35
问题 How can I ssh to google collaboratory VM? Is there a more straightforward way to do it than to create ssh tunnel from jupyter notebook to a remote server? 回答1: Try pasting the following into a cell and running it (inspired by this gist): import random, string, urllib.request, json, getpass #Generate root password password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20)) #Download ngrok ! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux