Home

Awesome

<p align="center"> <img alt="ML Notify" src="docs/assets/logo-with-text.svg" width="300"> </p> <p align="center"> <img alt="SDK Build" src="https://img.shields.io/pypi/v/mlnotify.svg"> <img alt="SDK Build" src="https://img.shields.io/github/workflow/status/aporia-ai/mlnotify/Bump%20Version/main?label=sdk%20build"> <a href="https://app.fossa.com/projects/git%2Bgithub.com%2Faporia-ai%2Fmlnotify?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Faporia-ai%2Fmlnotify.svg?type=shield"/></a> <img src="https://img.shields.io/github/license/aporia-ai/mlnotify" alt="License"> <a href="https://github.com/aporia-ai/mlnotify/issues"><img src="https://img.shields.io/github/issues/aporia-ai/mlnotify" alt="Issues"></a> <img src="https://img.shields.io/github/last-commit/aporia-ai/mlnotify" alt="Last Commit"> <a href="https://pypi.org/project/mlnotify/"><img src="https://pepy.tech/badge/mlnotify" alt="Downloads"></a> <!-- The Netlify badge is disabled since it's bugged. For more details: --> <!-- https://answers.netlify.com/t/status-badge-incorrectly-shows-failing-when-deploy-is-auto-cancelled/7316/26 --> <!-- <a href="https://app.netlify.com/sites/mlnotify/deploys" alt="Website Deploy Status"><img src="https://api.netlify.com/api/v1/badges/a832ff7a-83aa-4c70-99b1-f812ae4bc3d8/deploy-status"/></a> --> </p>

No need to keep checking your training. Add <strong>just 1 import line</strong> and MLNotify will let you know the second it's done.

Features:

<p align="center">Made with :heart: by <a href="https://www.aporia.com?utm_source=github&utm_medium=github&utm_campaign=mlnotify" target="_blank">Aporia</a></p> <p align="center"> <kbd> <img alt="ML Notify" src="docs/assets/usage.gif"> </kbd> </p>

Quickstart

pip3 install mlnotify
# STEP 1: Import package
import mlnotify

# STEP 2: Do your thing.
my_model.fit(...)

# STEP 3: Browse to mlnotify.com and get notified when training is done!

The import will automagically hook into your fit/train method.

Usage

Simple

import mlnotify

This will automagically hook into your fit/train method.

Supported ML frameworks:

Jupyter Notebook

import mlnotify

And in any Jupyter cell:

%%notify
...

Works with line magic, too

%notify your_code()

Manual

The library also exports a manual API to be used if you want to do it manually.

import mlnotify

mlnotify.start() # Start tracking
# ...
mlnotify.end() # End tracking

Advanced

The library uses a simple plugin architecture. You can register your own plugins to extend the library's functionality.

from mlnotify import BasePlugin, plugin_manager

# A plugin is simply a class with `before` and `after` methods
class MyPlugin(BasePlugin):
    def before(self, *args, **kwargs):
        # Called before the fit/train method
        print("MyPlugin: training started")

    def after(self, *args, **kwargs):
        # Called after the fit/train method
        print("MyPlugin: training finished")

plugin_manager.register_plugin(MyPlugin())

# Use mlnotify as you normally would
model.fit(...)

API

The library exports four items:

from mlnotify import start, end, plugins_manager, BasePlugin

start() -> None

Starts tracking.

end() -> None

Ends tracking.

plugins_manager: PluginsManager

The class handling all plugin registration and invocation. Methods:

Security

No sensitive data is sent to the MLNotify server - only training start & end time.

Contribution, self-deployment & local development

Contributions and self-deployments are more than welcome.

Website & API

This project relies heavily on SaaS products, and must receive proper config for Netlify, Firebase and SendGrid for it to work. You can run this project locally using the Netlify CLI:

SDK

License

FOSSA Status