Skip to main content

dcyd model performance monitoring client

Project description

DCYD Model Performance Monitoring Client

Visit https://www.dcyd.io/ for more details.

Install

Requires Python 3 before start

Using pip

pip3 install dcyd -U

Using pipenv

pipenv install dcyd

Configure

Generate the dcyd.json configuration file

dcyd-config $DCYD_PROJECT_ID $DCYD_PROJECT_ACCESS_TOKEN

Point the DCYD_CONFIG_FILE environment variable to the above file location

export DCYD_CONFIG_FILE=/path/to/project/dcyd.json

Usage

Simple monitoring

from dcyd import dcyd

@dcyd.monitor
def my_predict_function(features):
    result = None
    # run my model(s) logic
    return result

Transform function arguments before sending out

from dcyd import dcyd

@dcyd.monitor(transformers={
    'arg1': lambda value: value + 1,
    'arg2': lambda value: value - 1,
    'arg3': lambda value: value * -1,
})
def my_predict_function(arg1, arg2=2, arg3=10):
    result = None
    # run my model(s) logic
    return result

Transform function return value before sending out

from dcyd import dcyd

@dcyd.dcyd.monitor(return_transformer=lambda value: value + 1)
def my_predict_function():
    return 0

Turn on writing data to a local file

Set the environment variable DCYD_CLIENT_FILE_LOGGER with the file path you want to write to.

An example is:

export DCYD_CLIENT_FILE_LOGGER=/tmp/dcyd-client.log

Disable sending data to DCYD

Make sure the dcyd.json file is absent from your project directory.

And make sure these environment variables are absent from the process. You can unset them by running the following:

unset DCYD_CONFIG_FILE
unset DCYD_PROJECT_ID
unset DCYD_PROJECT_ACCESS_TOKEN

Project details


Download files

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

Source Distribution

dcyd-1.3.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcyd-1.3.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file dcyd-1.3.0.tar.gz.

File metadata

  • Download URL: dcyd-1.3.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for dcyd-1.3.0.tar.gz
Algorithm Hash digest
SHA256 215ac8c212cc8a4f178f05b4cb4e724e82d6c8e1fed79e4968caa8921d64ff4e
MD5 c6f69b5885272e5a00e5ec6b383d8239
BLAKE2b-256 476092738d87a31200aa26aafd24e148e063da3f4a2c7f4c22c2466259f8686a

See more details on using hashes here.

File details

Details for the file dcyd-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dcyd-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for dcyd-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fda8cf11cd868ee6424b3fe236363179f308ac590828b107f1ceee54bbf49ed9
MD5 41b6199c56e03b72a94eb05f8686f3f0
BLAKE2b-256 cf846cfb7232712eb9a798cc470258675314a318d6b9f8b8171f0846b93af08e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page