Skip to main content

What is ml-clerk?

ML-clerk, at its core, is a lightweight logging library that helps you keep track of performance, model parameters, timing (or whatever) throughout your data science experiment.

I'm a data scientist. Why should I care?

As a data scientist you're constantly running new experiments. As you run new experiments, you are recording your results (if not, you should be recording your results). ML clerk does exactly that. It reduces the inertia by automatically recording the results of your experiment, so you don't have to worry about keeping track.

Ok now that I'm convinced, where does model-clerk log stuff?

ML clerk has two places where it tracks things - excel or google sheets. Excel setup is easier, so start with that. For google sheets usage, see the link below.

Train a model - for demo purposes only

# Imports
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression

dataset = load_iris()

# Define data
X = dataset['data']
y = dataset['target']

# Train the model
logistic_regression_classifier = LogisticRegression()
logistic_regression_classifier.fit(X, y)

predictions = logistic_regression_classifier.predict(X)
probabilities = logistic_regression_classifier.predict_proba(X)

Excel Usage

# Record artifacts to excel
from ml_clerk import Clerk

# Set up the clerk with excel mode
clerk = Clerk(excel_mode=True)

# file_path refers to the excel workbook you want to record in, and the sheet name referes to the sheet
clerk.set_up(filepath='hello_world.xlsx', sheet_name='Sheet1')

# Record all the artifacts in one go
clerk.record(predictions=predictions, probabilities=probabilities, model_parameters=logistic_regression_classifier.get_params())

Figure out google sheets permissions prior to using the google sheets mode. Follow directions below if you need any help.

Google Sheets Usage

# Record artifacts to excel
from ml_clerk import Clerk

# Set up the clerk with google sheets mode
clerk = Clerk(google_sheets_mode=True)

# file_path refers to the excel workbook you want to record in, and the sheet name referes to the sheet
clerk.set_up(file_path='#your google sheets url', sheet_name='#your sheet name')

# Record all the artifacts in one go
clerk.record(predictions=predictions, probabilities=probabilities, model_parameters=logistic_regression_classifier.get_params())

Google sheets permissions

  1. Follow this link for how to permission your Google account - https://erikrood.com/Posts/py_gsheets.html
  2. Make sure you enable the Google sheets API under the project in Google console.
  3. Update the .env with the path to token.json credentials file.

Metadata

Release files for ml-clerk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ml-clerk 1.0.0
File Size Uploaded Provenance Actions
ml-clerk-1.0.0.tar.gz 4.2 kB Without provenance Details for ml-clerk-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ml-clerk 1.0.0
File Interpreter ABI Platform Actions
ml_clerk-1.0.0-py3-none-any.whl Python 3 none any Details for ml_clerk-1.0.0-py3-none-any.whl

Total release size: 8.6 kB

Release files / ml-clerk-1.0.0.tar.gz

Download URL ml-clerk-1.0.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e4621ef613ce4fc1b51d1b720ca477c2b9e99b276e62c710afa2dd984fb8736c
BLAKE2b-256 checksum
How to use checksums
6dc21016156a7c3620443e21d0390799c5838d1986538249557fc1aaf94c11d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.11.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1

Release files / ml_clerk-1.0.0-py3-none-any.whl

Download URL ml_clerk-1.0.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10c67c293d84eee6d46b8a1316bac6ecd94205916534379aca1a2139b66f9845
BLAKE2b-256 checksum
How to use checksums
ab690c8518cf73b875ec9aa165ed520207cea357c7613b60e0bd9544e4c5869c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.11.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.1

Security for ml-clerk 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page