Skip to main content

Jackdaw ML

Jackdaw is a framework designed to help Data Scientists save, load, and deploy Machine Learning models in a simple and robust way.

Unlike other frameworks, sharing a model only requires two short lines of code.

  1. @find_artefacts

    Scan model code, finding model artefacts and variables. Jackdaw supports PyTorch, Tensorflow, XGBoost, and LightGBM out of the box, but is trivial for users to expand to other frameworks.

  2. jackdaw_ml.saves

    Model artefacts are saved to either local or remote storage, and the user is provided with a Model ID. Users can store the ID for use in deployment, or search for the model by its name, metrics, Git branch, etc.

A Model can be as simple as a stored number, or as complex as a combination of frameworks. Regardless of complexity, Jackdaw aims to make it simple to share your models with other applications, other colleagues, or other companies.

Documentation is baked into the repository, and is available here.

Example of Save & Load of a PyTorch model via Jackdaw

Setup - Working Locally

Jackdaw is available on PyPi and can be installed via pip;

>>> pip install jackdaw_ml

Alpha - Limited Windows & Mac Support

While Jackdaw is in Alpha, one of the libraries it relies upon - artefactlink - only supports Windows and Mac OS/X for Python 3.10. Linux support is available for 3.8, 3.9, and 3.10.

Setup - Sharing Models across Environments

To share items across multiple computers, you'll eventually need an account with ShareableAI.

For now, you just need your API Token. If you don't have a token, reach out to lissa@shareablei.com and they'll ping you one.

Roadmap - Future Features

View our Public Roadmap here

Getting Started

Example by Framework

Example

The core magic of Jackdaw is within the @artefacts and @find_artefacts decorators.

@artefacts allows you to list what should be saved on a Model. @find_artefacts will detect what should be saved based on a whole host of common frameworks. Combining the two is a powerful way of ensuring complex models can be saved easily.

from jackdaw_ml.artefact_decorator import find_artefacts
from jackdaw_ml.trace import trace_artefacts
from jackdaw_ml import saves

import lightgbm as lgb
import numpy as np

@find_artefacts()
class BasicLGBWrapper:
    model: lgb.Booster

    
# The LightGBM model isn't defined yet, but we can discover it via annotations.
#   LightGBM is Pickle-safe, so it's serialised via the PickleSerialiser by default.
# >>> trace_artefacts(BasicLGBWrapper())
# <class '__main__.BasicLGBWrapper'>{
#         (model) [<class 'jackdaw_ml.serializers.pickle.PickleSerializer'>]
# }


def example_data() -> lgb.Dataset:
    data = np.random.rand(500, 10)  # 500 entities, each contains 10 features
    label = np.random.randint(2, size=500)  # binary target
    return lgb.Dataset(data, label=label)

# Create a new Model
model = BasicLGBWrapper()
# Modify the model
model.model = lgb.train({}, example_data())

# Save the model
model_id = saves(model)

Saving Remotely

Saving and loading items from ShareableAI servers, rather than locally, can be achieved by providing an API key alongside the call to artefacts. If you'd like to test this, please follow the setup for Sharing Models Remotely.

from jackdaw_ml.artefact_decorator import artefacts
from jackdaw_ml.serializers.pickle import PickleSerializer
from jackdaw_ml.artefact_endpoint import ArtefactEndpoint

@artefacts({PickleSerializer: ["x"]}, endpoint=ArtefactEndpoint.remote('MyAPIKey'))
class MyModel:
    def __init__(self):
        self.x = 3

We'll be expanding this to allow for sharing items between other users very soon, so keep an eye on Corvus to know more.

Release files for jackdaw-ml 0.0.7

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

Source distribution (sdist)

Source distribution for jackdaw-ml 0.0.7
File Size Uploaded
jackdaw_ml-0.0.7.tar.gz 32.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jackdaw-ml 0.0.7
File Interpreter ABI Platform
jackdaw_ml-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 73.8 kB

Release files / jackdaw_ml-0.0.7.tar.gz

Download URL jackdaw_ml-0.0.7.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d63104e330105ba1d6d0d833f8e71190cf74bb9699623d8867e26f757cac375c
BLAKE2b-256 checksum
How to use checksums
4e2d9ac50e68bf49e57ee90554f56555fd49a1d53ee996d27d825f20eab5cfe2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1031-azure

Release files / jackdaw_ml-0.0.7-py3-none-any.whl

Download URL jackdaw_ml-0.0.7-py3-none-any.whl
Size 41.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7a6f7075c984889fbfe2f0792cf5d1a8b3b2ecaba45ee31a9b02f84a01e1542
BLAKE2b-256 checksum
How to use checksums
6838c5d8d3589e8ba52916403dea3c13ec330adc946bb3aeae2f260f1493b5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1031-azure

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.1

1 release file

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