Metadata-Version: 2.1
Name: vsp-model-insight-azuretable
Version: 0.1.0
Summary: Model Performance Metrics Monitor Exporter
Home-page: https://pypi.org/project/vsp-model-insight-azuretable/
Author: he ke zhang
Author-email: yxzhk@hotmail.com
License: Apache-2.0
Classifier: Intended Audience :: End Users/Desktop
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9

VSP Model Insight
==================================


Installation
------------

::

    pip install vsp-model-insight-azuretable

Prerequisites
-------------

* Create an VSP Model Monitor resource and get the connection string, more information can be found in the official docs.
* Place your connection string directly into your code.
  
Usage
-----

Log
~~~

The **Model Performance Log Handler** allows you to export Python logs to `VSP`.

This example shows how to send a warning level log to Azure Monitor.

.. code:: python

    import logging

    from vsp_model_insight.azuretable import ModelPerformanceLogHandler

    logging.basicConfig(level=logging.DEBUG)
    rootlogger = logging.getLogger()
    handler = ModelPerformanceLogHandler(connection_string='****')
    rootlogger.addHandler(handler)

    properties = {'model_signature': 'demo','model_performance': {'key_1': 'value_1', 'key_2': 'value_2'}}
    logging.info(f"{datetime.now()}",extra=properties)


References
----------


* `Examples <https://please.todo.com>`_
