Google Colab: Your session crashed for an unknown reason - google-colaboratory

I am using some modelling software on Google Drive, importing the necessary python libraries for the work I'm doing and running the 3rd party software (model builder). There hasn't ever been an issue in the first two parts of this, only when running the software.
Sometimes, it crashes when I start the model builder and sometimes it crashes after some iterations (the modeling software is running anywhere from 30-1000 times depending on what type of model I'm building). So, sometimes it completes the job (as it lasts enough iterations) and other times it doesn't.
I've had the same model as this run without issue before, and I've only changed one parameter in the model, which I can't see being the cause of this error.
I understand that the error and some of the information here is quite vague, however any input on how to solve this issue would be greatly appreciated.
Update
The less populated my Google Drive is the more the code progresses, however I am only using 20% of my storage and still having these problems.

Related

ntoskrnl.exe BSOD's & Random black screen with a frozen cursor

Over the past couple months I have been experiencing BSOD's (some for other reasons but now it's just this one exe) and occasional black screen's.
I have gone through what I believe to be every driver and updated them, ran the windows memory diagnostics tool and the driver verifier and ran 2.5 passes of Memtest and had no issues with any of those, reset my computer to factory default (which is why I don't have the minidumps that I had before), and looked up everything I could trying to troubleshoot this issue. I'll take any good advice I can get from this point on and will answer any questions I can. Here are the mini dumps I have so far:
https://drive.google.com/drive/folders/1VqgX2KXoM32E6K0jAng-WoHZXDI8SOv1?usp=sharing

Does running a code multiple time use a lot of memory?

I have just gotten into programming and i realized for every variable that you identify, you use ur computer memory as it is saved in it somewhere.
I wanted to know if I run a piece of code multiple times, would I lose more memory or somehow once you close terminal or program, system deletes it automatically.
THANK YOU
I've run a code several times and every time the address that a same variable is saved in is different.
I believe I'm wasting my computers memory so if I am how do I delete said variables from memory?
Yes, for all intents and purposes, it is gone the second the program has finished executing.
There are times that this isn't true, but they almost certainly don't apply to you. When on a normal computer or OS running device, the OS (operating system) will clean-up any resources used by your code when it is finished running. This includes all the memory used by declared variables (which is tiny amounts anyway, normally), files you have opened and forgotten to close, and pretty much everything else. OSs are very resilient!
I've run a code several times and every time the address that a same variable is saved in is different. I believe I'm wasting my computers memory so if I am how do I delete said variables from memory?
These are some pretty good investigative skills (a good sign for someone new to programming), but there are different reasons for this, don't worry. Memory addresses are a complex topic that is worth a look at later down the line, but the simplified story is that memory addresses are different every time you run the program for both security and performance reasons.

Frequent disconnects while busy running in Google Colab

In the last week or two I have seen frequent disconnects while trying to run a lengthy training run. A month or two ago this seemed to be working pretty reliably. My code has definitely changed but those internal details seem unrelated to the operation of Colab.
(On the other hand, I did switch my local machine from an Intel MacBook Pro running Big Sur to an M1 (Apple Silicon) MacBook Pro running Monterey. I assume that does not matter to Colab running in the cloud, via a Chrome browser.)
I see two kinds of disconnects:
There are “faux disconnects” which seem like false positives from
the disconnect detector. These last less than a second, then the
computation continues apparently unscathed. A black notification
slides up from the lower left corner of then window, then slides
back. See a link to a video of this below.
Then there are “real disconnects.” I start a computation that I
expect to run for several hours. I see “faux disconnects” happen
frequently. But less than an hour into the computation, I find
the Colab window idle, no status information, and a Reconnect button
in the upper right corner.
Link to video. I started this session around 1:03 pm. This video was recorded at 1:35 pm. Normally the training session should have run for several hours. Instead it died at 1:52 pm (~50 minutes into the run). See some additional comments in an issue at GitHub.
Can anyone help me understand how to get past this? I am currently unable to make progress in my work because I cannot complete a training run before my Colab runtime decides to disconnect.
Edit:
FYI: since once a “real disconnect” happens it is too late to look at the (no longer connected) runtime's log, and since this seems to run for about an hour before disconnecting, I saved a log file when a run was about 10 minutes in.
Edit on August 1, 2022:
My real problem is the “real disconnect” on my real Colab notebook. But my notebook is overly complicated, so not a good test case. I tried to make a small test case, see Colab notebook: DisconnectTest.ipynb. It contains a generic NIST-based Keras/TensorFlow benchmark from the innertubes. I made a screen grab video of the first 2.5 minutes of a run. While this run completes OK — that is, there are no “real disconnects” — it had several “faux disconnects.” The first one is at 1:36. These seem fairly benign, but they do disrupt the Resources panel on the right. This makes it hard to know if the source of the “real disconnect” has anything to do with exhausting resources.
As I described in a parallel post on Colab's Issue #2965 on Github, this appears to be “some interaction between Colab and Chrome (and perhaps macOS Monterey (Version 12.5.1), and perhaps M1 Apple Silicon). Yet Colab seems to work fine on M1/Monterey/Safari.”
As described there, a trivial Colab example fails on Chrome browser but works fine on Safari.

Program won't start before stop the program frist?

I'm a newbie using LabView for my project. So I'm developing a program that gathers data from sensors that attach in the DAQmx board and also a spectrometer from STS-VIS ocean optic. At the first developing, I combine both devices in one loop inside the same flat structure, but I got an error saying: "The application is not able to keep up with the hardware acquisition." I cannot get the data showing on the graph for both devices, but it was just fine if I run it separately. And I found the solution saying that I need to separate both devices in a different while loop process because it may have different buffer size (?). I did it and it worked that all the sensors are showing in each graph. But the weird thing is, I need to stop the program first at the first run, then run it again for the second time for getting the graph showing in the application. Can anyone tell me what I did wrong and give me a solution? Due to the project rule I cannot share my Vi here publicly, but if anyone interested to help, I'd like to share it personally. Thank you.
you are doing right thing but you have to understand how Data acquisition work in LabVIEW and hardware.
you can increase hardware buffer Programmatically using property node or try to read fast as possible then you dont need two separate loop.
NI
I work currently with a NI DAQmx device too and became desprate using LabView because there is not good documentation and/or examples. Then I started to use Python which I found more intuitively. The only disadvantage is that the userinterface is not so easily generated, but for this one can use the QT Designer (open source programm avaiable online).

Is there any feature of programming that automatically detects computational repetition?

I'm new to programming, taking MIT's 6.00. While watching the Dynamic Programming lecture a simple question occurred to me: Is there any kind of built-in feature (for computers in general) to detect repetitive tasks and compensate?
I realize that's quite vague. I was working on my grandfather's computer because he had been complaining that it was slow. Indeed, it would lag for up to 15 seconds at a time, waiting for programs to open, etc. When I upgraded the RAM, the problem was gone. So if the computer was constantly having to write page ins and page outs to disk, why couldn't it have just popped up a little message suggesting a RAM upgrade? That would save quite a bit of time.
Computers are good at performing tasks quickly but slow code can be, well, slow. Can that be automated? Is this even a legitimate question?
In the example you describe the code isn't slow because it's reading/writing to disk. It's slow because it isn't actually doing anything but instead is waiting for the OS to page in and out to disk.
Also, a RAM upgrade isn't always the solution to frequent paging (say buggy program leaking memory or something).
It's not really possible in the general sense for the OS to detect what all the possible issues are and suggest a solution. That is in fact a variation of the Halting Problem.
It's impossible in general for a computer to know whether a slowness was because it's running an operation that fundamentally takes a long time to finish, or whether it's taking more time than it should really be.
Also, even if you've identified that an operation is slow, it's even more difficult to diagnose the precise reason why it is slow. Sometimes it's because you need more RAM, other times because slow network, or slow disk, or slow CPU. This is even more harder if the checker is running inside the same machine that it is running on since it's also experiencing the slowness itself.
However there are several things that can be done under certain limited situations. Many popular OSes (e.g. Windows, Linux, Android) can detect slow response to user input, and will offer to either give more time or force close applications (Android) or draw the not responding window in grayscale (Linux), or in bluish tint (Windows), if the application fails to respond to user input within certain period of time.