dcyd model performance monitoring client
Project description
MPM Model Performance Monitoring client
Installation
Requires Python3.
$ pip3 install dcyd -U $ dcyd-config AN_ALPHANUMERIC_USERNAME $ export DCYD_CONFIG_FILE=/some/path/dcyd.json
dcyd.json
lands in the local directory by default. It can be moved around, as long as its new path is re-exported in step 3.
Usage
Here are some usage examples.
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
, caller_id
, environment
) for helpful tracking:
from dcyd.mpm import mpm @mpm(customer_id='asf434', `model_version=2.2, ...) 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(transaction_id='a113fdf3434', ...) def my_predict_method(self, *args, **kwargs): ... return some response
Development
- Clone the repo locally, and switch to a branch other than
master
. - Create and activate a virtual environment:
$ python3 -m venv my_env_name
- 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.
- Increment the version in
setup.py
, using these rules (or newer). - Install/update some modules:
$ pip3 install --user --upgrade setuptools wheel twine
- From the directory containing
setup.py
(and not in a virtual environment), create the wheel:
$ rm -rf build/ dist/
$ python3 setup.py sdist bdist_wheel
- Upload the wheel to PyPI:
$ python3 -m twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dcyd-0.0.24.tar.gz
(5.4 kB
view hashes)
Built Distribution
dcyd-0.0.24-py3-none-any.whl
(7.0 kB
view hashes)