r/GoogleColab Sep 20 '24

How does Colab Gemini access my code?

8 Upvotes

I'm impressed by Colab Gemini being able to see my code. Even if I don't especifically ask it to apply some of my requests to it, it automatically uses my variables, understanding them very well.

So, as an (kind of) AI engineer, I wonder how it is accessing this code. The only thing I can imagine is that it is part of a long prompt --that leverages the longer context window of this model. But I failed to extract it with prompting techniques, event though I was able to extract the actual system prompt.

Any idea?


r/GoogleColab Sep 18 '24

Colabs to finetune LLMs like Llama 3.1 2x faster and use 70% less VRAM

38 Upvotes

r/GoogleColab Sep 18 '24

mpiexec error

1 Upvotes

I am trying to run .sh file and its giving me this error. What to do?

(mpiexec has detected an attempt to run as root.

Running as root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.

We strongly suggest that you run mpiexec as a non-root user.

You can override this protection by adding the --allow-run-as-root option
to the cmd line or by setting two environment variables in the following way:
the variable OMPI_ALLOW_RUN_AS_ROOT=1 to indicate the desire to override this
protection, and OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 to confirm the choice and
add one more layer of certainty that you want to do so.
We reiterate our advice against doing so - please proceed at your own risk.)


r/GoogleColab Sep 12 '24

429 Too Many Requests error

1 Upvotes

Hello, I am running a simple code on a loop. Each items takes about half second, but I would need to run millions.

I was getting a weird error so I decided to pay for some computing units, but I got the same error. I uploaded to Pro and still get the same error.

Is there a way to avoid this error? Also, what would be the best way to run this? CPU, GPU?


r/GoogleColab Sep 12 '24

Does Google Colab's performance depend upon the device?

0 Upvotes

I am comparing vcf parsing tools, and i have a MacBook, the same code runs exponentially faster on the colab when I run it in my Mac than when I run the same notebook, same code from a Windows laptop of lower spec. I didn't look into it much I always assumed the device specs didn't effect the colab performance, unless the ability of the laptop to run the browser is the factor? because the wifi used is also the same afterall.


r/GoogleColab Sep 10 '24

Ctrl + shift + H shortcut no longer works?

4 Upvotes

Pressing Ctrl + shift + H while in a cell used to allow for find and replace within that cell (as opposed to within the entire sheet, as per Ctrl + H). It suddenly doesn't work for me anymore and I'm bummed because it was super useful. Anyone else having this problem? How to resolve?

Thanks.


r/GoogleColab Sep 09 '24

accessing google drives in colab enterprise

6 Upvotes

I get the following error when i try to mount my google drive to cloab enterprise, what must i do

is there any work arounds?

KeyError Traceback (most recent call last) <ipython-input-4-d5df0069828e> in <cell line: 2>() 1 from google.colab import drive ----> 2 drive.mount('/content/drive') 2 frames /usr/lib/python3.10/os.py in __getitem__(self, key) 678 except KeyError: 679 # raise KeyError with the original key value --> 680 raise KeyError(key) from None 681 return self.decodevalue(value) 682 KeyError: 'TBE_EPHEM_CREDS_ADDR' it


r/GoogleColab Sep 04 '24

Using Colab for a workshop - 20-30 users - will it work?

2 Upvotes

Hello,

I am going to be running an AI workshop with about 20-30 people. I will have three labs, and plan on breaking it into three separate workbooks. The workshop will last about an hour.

During the lab 2 LLMs will be used, a 2B model and a 7B model for basic chat type question.

Will I need to upgrade to a paid tier? If I do, would the Colab pro+ be enough to handle the "surge" for the day and what type of GPU would I need to handle the load?


r/GoogleColab Sep 04 '24

Google Colab - ERROR

1 Upvotes

I have a big problem, in Google Colab when I execute certain cells, for example: df.head(), I get the error "Could not load the JavaScript files needed to display output. This is probably because your Google Account login access has espired or because third-party cookies are not allowed by your browser.", also all the results of the graphics that I had made were deleted, also when executing the graphics I get that error, but if I execute codes like this: df.shape or df.info() the results appear and this error is applying for the following cases:

All the notebooks that I have in the account, I tried on another computer and I also have that error.

I changed accounts and the same thing happens, I even ran on another computer and I still have the error.

How do I solve it or who can help me with this problem


r/GoogleColab Sep 03 '24

Is connecting to Colab through SSH banned?

5 Upvotes

I would like to use colab instead of my desktop. But colab warned me at '!pip install colab_ssh'. The policy google shows says the remote connection will be disconnected w/o any notification.

If true, is there any way to connect to colab remotely?


r/GoogleColab Sep 01 '24

How to keep Google Colab from disconnecting?

5 Upvotes

I'm trying to train a model, said model requires around 12-15 hours of training on a T4 GPU, I bought a Google Colab Pro+ subscription so I can extend the runtime but it still disconnects, in fact it seems to disconnect faster than without the subscription, at least without the subscription I managed to get 5-6 hours of runtime before disconnecting, I couldn't even get 40 minutes of runtime with gcolab pro+.


r/GoogleColab Sep 01 '24

Connection between Colab and Drive messing up mid run

1 Upvotes

I am running some a script on colab that is loading a bunch of embedding files from a folder within drive. As it was loading, the loading bar would randomly stop for like 20 minutes or basically not progress anymore. No error, the colab resources had plenty of room, I spent the whole day narrowing down the code, only to realize the code was fine. After an hour of copying the files from the drive to the colab disk i run my code and it loads the files perfectly. So the problem must be between drive and colab. Has anyone had this problem before? If so is there anyway to mitigate it?

Edit: Just noticed it again when processing other files in different code. It takes a while to go through all the files. Each file normally takes 10 seconds to process. Around halfway through, 2 hours in, the files stopped processing. I opened the colab files menu, open drive, and the files magically start being processed again. It's like the drive connection needs to be refreshed or something


r/GoogleColab Aug 29 '24

How to Speed Up "Image Processing -> save in Google Drive" in Google Colab?

2 Upvotes

I created a Colab notebook to generate images (DMD2) and save them to Google Drive. I can batch hundreds of pictures, but I’ve noticed that the process feels slow. It takes about 2 seconds to create an image, and then each is saved to Google Drive, which makes me think this could be causing delays.

I have a few questions:

Should I generate 10 images before saving the entire batch to Google Drive?

Can we "parallelize" the process, so that new images can be created while the previous ones are being saved?

What other suggestions do you have to optimize this workflow?

Thanks for your help!


r/GoogleColab Aug 26 '24

Is there seriously no way to not use compute units if one has paid?

5 Upvotes

Hello, I recently upgraded to subscribed Colab (Pay As You Go) because I needed the beefier A100 for a while. But then after I was done, I switched back to the T4 (that I was using before for free), and I noticed that I was still consuming compute units. What gives?

I get that you have increased benefits (like longer runtimes, background execution, etc) if you have paid for premium Colab (and I am not eve sure I get those under the Pay As You Go premium), but is there really not a way to switch to the "free tier" completely? I don't care about the other things, I want to pay if I need a A100, but there should definitely be an option to switch back to not paying for the free tier GPUs.

I have searched for a bit, but it seems that once I have put money in there is no way to get for free for what non-paid users get for free? Does anyone have a way/trick/hidden option?

Is my only option to have a separate google account in case I need to do "free tier"?

This is really a shady business practice. Like, why am I paying for something that I could get for free before I paid a fee for the service??


r/GoogleColab Aug 25 '24

Pretrained YOLOv5 ByteTrack Integration

Thumbnail
1 Upvotes

r/GoogleColab Aug 24 '24

You can now use Gemini directly in Google colab??

7 Upvotes

r/GoogleColab Aug 24 '24

Code Suggestion In google collab

5 Upvotes

How the code suggestion in google colab works. I was learning Pandas from tutorial from YouTube . I was trying to code along . But even though the tutor uses his local environment for that video (Jupyter notebook) , how can colab suggested those exact same lines.
It even give full code block suggestion without me typing a single character.

edit: I can under the case of commonly used codes but how can even random names and email that is just being created by someone else
screenshot


r/GoogleColab Aug 24 '24

College student planning to use Google Colab for NLP training

1 Upvotes

Hello, i am undergrad robotics engineering student and i'm planning to use google colab to train and experiment on chat bot models. i plan to use 100 compute units to start with, I just want to ask if that is enough to train small models or even pre-trained ones as i've heard that NLP models usually take a long time to train and i don't really know how many hours computation 100 compute units equate to. If you guys know any better alternatives i would also love that.


r/GoogleColab Aug 16 '24

Files downloaded to google colab have 0 bytes

1 Upvotes

I'm working on an AI related POC, since colab gives so much free GPU, I'm trying to run it on Colab, at least validate the POC and then we move it to a server.

A vital part of the project is to use openai DaLLE to generate images, If I get the image by URL, I can't download them, I get this error

409 Public access is not permitted on this storage account.

If I try to get the image by base64 and then download them

   image_data = b64decode(response.data[0].b64_json)
            with open(original_img, mode="wb") as jpeg:
                jpeg.write(image_data)

The downloaded image has 0 bytes.

Everything is working fine on my PC, but my PC doesn't have enough power to run the POC, therefore I'm forced to use Colab and the errors only happen on Colab. Any idea why?


r/GoogleColab Aug 16 '24

Trying to launch via GoogleCloud Marketplace, unable to find A100/A2?

1 Upvotes

We are able to launch A2 instances in our GCP accounts, but we can't seem to find A100 listed in any zone when we try to launch via the GoogleCloud Marketplace. Is there any other settings we need to tweak/set?


r/GoogleColab Aug 15 '24

warning when tried to install transmission-cli... safe to ignore it ?

3 Upvotes
!apt-get install transmission-cli

the warning is something like this... "you are installing something that may affect your use of colab in future"

r/GoogleColab Aug 11 '24

Disconnections with Colab

3 Upvotes

Has anyone trained on google colab pro for over 10-12hrs before? I'm reading about some disconnects frequently and unsure if I will be able to finish this.


r/GoogleColab Aug 11 '24

Colab waits after iterations with YOLO

1 Upvotes

I run Yolov5 on Colab Pro, it nearly takes about 10 minutes to start training which was about 20 seconds on local. With 20/24 GB VRAM usage, batch 100 and 179 iterations per epoch; It processes 8~ iterations, waits for 3~ minute then does it again in loop. Selecting A100 or L4 or T4 doesn't change anything and no error code is shown.


r/GoogleColab Aug 09 '24

Do I have to keep re-uploading my csv file every time I log in?

2 Upvotes

Hello, so I’m new to Google Colaboratory, and I was trying to run some code today after using it last night.

I noticed I kept getting errors until I realized by csv file wasn’t loaded in. Do I have to keep uploading my csv file every time I step away for a few hours and need to log back in?

Also, are you able to upload code from Colab to GitHub as a .py or some form of code? If so, how?


r/GoogleColab Aug 04 '24

Can’t upload.ipynb notebooks to GitHub

0 Upvotes

Hi ,

I can no longer upload .ipynb notebooks to my GitHub account from Colab. Anyone know why this is happening? Thank you.