GithubHelp home page GithubHelp logo

bitnom / colabctl Goto Github PK

View Code? Open in Web Editor NEW
249.0 14.0 78.0 46 KB

Google Colaboratory background/task executioner & controller.

License: GNU General Public License v3.0

Python 100.00%
python python3 google-cloud google-colaboratory google-colab colaboratory colab machine-learning

colabctl's Introduction

colabctl v0.2.1

Task executioner & controller for Google Colaboratory notebooks. Google Colaboratory is a game-changing innovation. It allows anyone to access powerful hardware for machine learning, for free. Unfortunately, it's not possible to run colab notebooks programmatically or otherwise in the background unless you leave your browser running. Colabctl is a sort of shim that solves this problem by using headless Selenium.

BROKEN NOTICE

After realizing a few issues being submitted, I reran the code and saw that there are a few new issues due to Google changing their code. I'm now working to correct them. It shouldn't take too long, depending on what exactly they've done.

TODOs

  • Resolve issues #1 #2 #3 #4
  • Async execution of tasks.
  • Proper module structure for user command install via pip.
  • Better args parsing.
  • Revise & refactor the Seleium code.
  • Proper logging.

Pull requests welcomed.

Usage

First, add your Colaboratory URLs to notebooks.csv.

In colab, go to tools -> keyboard shortcuts and set "Clear all outputs" to CTRL + SHIFT + Q

In colab, go to tools -> keyboard shortcuts and set "Reset all runtimes" to CTRL + SHIFT + k

At the end of your notebook, add: print("forkin"+"me")

Now you're ready:

python colabctl.py <end-string> <sleep-seconds>

Example:

python colabctl.py forkinme 1800

Important!!!

Notice that the example delay is 1,800 seconds (30 minutes). Please DO NOT poll Google Colaboratory frequently. We're very lucky to have these notebooks and even luckier that this ctl is even possible. Please don't push them to block us from doing this.

Thank you

colabctl's People

Contributors

bitnom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colabctl's Issues

installation and execution instructions

Your script seems to be what I have been looking for, but after several (ok, many) failed attempts I am wondering if you can post some additional instructions (for newbies) on installing and running this?

Thanks! but your usage instruction is not clear

Hello,

I could not understand your usage instruction.

First, add your Colaboratory URLs to notebooks.csv.

-> I created notebooks.csv through google spreadsheet, and put my notebook's url which i need to schedule.

In colab, go to tools -> keyboard shortcuts and set "Clear all outputs" to CTRL + SHIFT + Q

Done

In colab, go to tools -> keyboard shortcuts and set "Reset all runtimes" to CTRL + SHIFT + k

There is nothing like reset all runtimes. But there is restrart runtime and run all cells. I have added this shortcut there. Dont know if i am right.

At the end of your notebook, add: print("forkin"+"me")

you mean in the notebook which i need schedule running?

**Now you're ready:

python colabctl.py

Example:

python colabctl.py forkinme 1800**

  • Completely not understood the above... Kindly be clear so that your work will be useful to everyone.

Waiting for your response.

Thank you for your support

Script hangs after logging in

I'm running colabctl for the first time and hence sign in into my google account. However, there's no output displayed on the terminal after No auth cookie detected. Please login to Google. (even though I sign-in)

Cannot login to google account

Hi ,
I am stuck at this line and cannot go further
wait_for_xpath(wd, '//*[@id="yDmH0d"]/c-wiz/div/div[2]/c-wiz/c-wiz/div/div[4]/div/div/header/div[2]')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.