How to disable background execution in Google Colab? - google-colaboratory

I have Colab Pro+ subscription. It now (I guess from yesterday) runs my notebooks as background. So I can only run two instances. Previously I was able to run 3. When I open Manage Sessions from Runtime > manage Sessions I can see that current colab notebook is running in Background Execution mode.
Sadly there seems to be no way to turn it off. When I click Runtime > Change Runtime Type I get this (no option to uncheck background execution)
Is there any other place, where I can turn background execution off?

Related

ColabPro+ limiting runtime to 24hrs

I thought ColabPro+ would allow me to run on a GPU for longer than 24hr, but the VM is getting killed right at 24hrs, while the (Chrome) browser is open, and a python program has been running the whole time using the GPU. I tried running in background mode and in this case it killed the VM in about an hour. What am I missing?

Colab restarts after I close the browser

I use Colab pro, open a session in a browser and type commands in the terminal. I especially install new software. But when I close the browser, my colab setting are restarted and I have to reinstall all those software again. Is there any way I can keep the software that are installed through terminal?
As you noted, Colab automatically destroys VMs after detecting user inactivity.
Colab Pro+ has a feature called background execution, which is exactly what you asked for: VMs persist after you close your browser. Note that Colab Pro+ costs 5x more than Colab Pro (as of 2022-01-09).
Alternatively, if the process of setting up the environment does not take a long time, I would put all the installation commands in the first cell, using shell access (!apt install my-things) or bash magic (%%bash). Thus, installing the software is done with one cell execution.

Is there a way to detach running remote ssh script in PyCharm?

I use remote shh interpreter in PyCharm regularly, using the configured deployment. I often run remote programs from PyCharm GUI (using F5 key), that takes hours to complete (e.g. training a deep net). This unfortunately means that any network outage causes running script to exit and I have to run the script over again. Is there a way to detach the running script so it keeps running? In the sense similar to what screen or nohup is doing? I know I can run it in screen manually via ssh, but it is a bit inconvenient.
Ok. I found out that this feature is not implemented yet. There is however a suggested workaround

Google cloud GPU machines reboot abruptly

When training a model on the GPU machine, it get interrupted due to some system patch process. Since Google cloud GPU machines do not have an option of live migration, it is painful task to restart the training every time this happens. Google has clearly mentioned that there is no way around this but to restart the machines in this Doc.
Is there a clever way to detect if the machine is rebooted and resume the training automatically.
Sometimes it also happens that due to some kernel update, the CUDA drivers stop working and GPU is not visible and CUDA drivers need a re-installation. So writing a startup script to resume the training is also not a bulletproof solution.
Yes there is. If you use tensorflow, you can use it's checkpointing feature to save your progress and pick up where you left off.
One great example of this is provided here: https://github.com/GoogleCloudPlatform/ml-on-gcp/blob/master/gce/survival-training/README-tf-estimator.md

Specify screen resolution for coded UI tests

I am running coded UI tests using Selenium from a build in VSTS.
The test library is built on a test agent (hosted and private available) and copied to a VM running Windows 10. Then the test agent is deployed to the VM and the task 'Run Functional Tests' is executed. The tests to be executed are selected through an association in the test manager of VSTS.
I would like to run these UI tests (in Chrome) in different screen resolutions, but when the test agent is executed, the headless session always runs in the default resolution of 1024x768. I need to run tests up to a 4k resolution. If there is a current session with the same credentials in a higher resolution, this session is "hijacked" and the tests run in the desired resolution.
But I cannot guarantee an existing session when those builds are triggers by either a schedule or another event.
I already followed an MSDN article how to specify a default resolution in the registry, but that doesn't work on neither Win10 nor on Srv2012.
Is there a parameter/setting in a test/run setting file that specifies the resolution of this headless session?
To avoid confusion: I know how to set the windows size of the browser, but that is limited to the maximum screen resolution, so the Selenium-specific commands to resize the browser don't do the trick ;)
Any hint appreciated! Thanks!