Skip to main content

A python library to note ml experiments on google sheet

Project description

labgsheet: Labnotes on Google Sheet

Build Status

A python library to note ml experiments on google sheet.

labgsheet provides an easy way to note ml experiments on Google Sheet.

At a Glance

You can use labgsheet in cosole like following:

# prepare for worksheet by gspread
>>> import gspread
>>> from oauth2client.service_account import ServiceAccountCredentials
>>> scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
# download credentials.json previously from Google Developers Console
>>> credentials = ServiceAccountCredentials.from_json_keyfile_name('credentials.json', scope)
>>> gc = gspread.authorize(credentials)
>>> ws = gc.create("Test for labgsheets").sheet1
# note an experiment where params and a metric are used
>>> from labgsheet import Experiment
>>> exp = Experiment(ws)
>>> exp.log_multi_params({'l1': 0.5, 'C': 10})
>>> exp.log_metric('aupr', 0.2345)

You can also use labgsheet in Google Colaboratory like following:

! pip install labgsheet
! pip install --upgrade -q gspread

from google.colab import auth
auth.authenticate_user()

import gspread
from oauth2client.client import GoogleCredentials

gc = gspread.authorize(GoogleCredentials.get_application_default())
ws = gc.create("Test for labgsheets").sheet1

from labgsheet import Experiment
exp = Experiment(ws)
exp.log_multi_params({'l1': 0.5, 'C': 10})
exp.log_metric('aupr', 0.2345)

After logging, you can get a google sheet like below:

image

Installation

To install labgsheet, use pipenv (or pip):

$ pipenv install labgsheet

Contribution

  1. Fork
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create new Pull Request

License

MIT

Author

Shotaro Kohama

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labgsheet-0.1.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file labgsheet-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for labgsheet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d2f41ae8eba263f587d64dcf637a5ed504a2ef3a3bd9efb634393ebacb11f64
MD5 f555ab7a6e885230ceefa4e014c94df5
BLAKE2b-256 6285d8dfc72a448eab3d0c87c28c65fa771c9998d04c50868a39d6c6ce4cfbf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page