Skip to main content

dcyd model performance monitoring client

Project description

MPM Model Performance Monitoring client

Installation

$ pip3 install dcyd
$ dcyd-config AN_ALPHANUMERIC_USERNAME
$ export DCYD_CONFIG_FILE=/some/path/dcyd-key.json

Usage

Barebones decorator of your predict function:

from dcyd.mpm import mpm

@mpm
def my_predict_function(some args, some kwargs):
    ...

    return some response

Decorate your predict function, but include some metadata (e.g. customer_id, experiment_group, model_version) for helpful tracking:

from dcyd.mpm import mpm

@mpm(optional kwargs for tracking/filtering)
def my_other_predict_function(some args, some kwargs):
    ...

    return some response

Decorate a method as well:

from dcyd.mpm import mpm

class MyModel(object):

  @mpm(optional kwargs for tracking/filtering)
  def my_predict_method(self, *args, **kwargs):
    ...
    return some response

Development

  1. Clone the repo locally, and switch to a branch other than master.
  2. Create and activate a virtual environment:
$ python3 -m venv my_env_name
  1. From the directory containing setup.py:
$ pip3 install .

or

$ pip3 install -e .

(These are in place of python3 setup.py install and python3 setup.py develop, for reasons explained here.

Distributing the package in PyPI

This process comes from this turorial.

  1. Increment the version in setup.py, using these rules (or newer).
  2. Install/update some modules:
$ pip3 install --user --upgrade setuptools wheel twine
  1. From the directory containing setup.py (and not in a virtual environment), create the wheel:
$ python3 setup.py sdist bdist_wheel
  1. Upload the wheel to PyPI:
$ python3 -m twine upload dist/*

Project details


Download files

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

Files for dcyd, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size dcyd-0.0.6-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size dcyd-0.0.6.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page