Skip to main content

Personal Formatting on Loguru

Project description

logsensei

Logo

Logger for Data Scientist - Documentation

Build Status Codacy Badge codecov Documentation

Introduction

This Python Package is build to solve one of the pain points in building Data Science projects: Having an effective logging system. As Data Science Projects often involve data ingestion, data transformation (Be it due to Data Cleaning Process, Feature Engineering, Feature Encoding, etc) and model building, we want to make sure that each steps of the process works as intended. Furthermore, in deploying our data science system, we often automate this data ingestion and data transformation processes. Effective logging will help us monitor our pipeline so that the model that we are about to train will yield consistent, accurate results.

Installation

pip install logsensei

Usage examples

logsensei is very easy and intuitive to use. You can load logsensei by:

import logsensei
from logsensei import logger

Save the logs into a file by:

logger.setup(name="personal_projects", logger_file="./logs", level=logsensei.DEBUG)

The setup is done! You can use various logging functions that is provided by the logger. Some of the examples are as follows:

array = np.array([1, 2, 3, np.nan, 3, 2])
logger.array(array, 'd_array')
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array shape : (6,)
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array unique values : {nan, 1.0, 2.0, 3.0}
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array cardinality : 4
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array missing values : 1 (16.67%)
>>> 2019-10-27 13:10:26 | INFO | __main__:<module>:2 | Array d_array info : MEAN=2.2 | STD=0.7483314773547882 | MIN=1.0 | 25TH=2.0 | MEDIAN=2.0 | 75TH=3.0 | MAX=3.0
logger.classification(target_binary, pred_binary, "Cancer Detection")
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Cancer Detection Classification Score
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | ====================
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Accuracy Score : 0.46
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Precision Score : 0.5111111111111111
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | Recall Score : 0.41818181818181815
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | F1 Score : 0.4599999999999999
>>> 2019-10-27 13:26:36 | INFO | __main__:<module>:1 | ROC AUC Score : 0.46464646464646464

For Full Documentation on the API, please visit API Documentation

Author

License

This project is licensed under the MIT License - see the LICENSE file for details

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

logsensei-0.3.2.tar.gz (44.1 kB view details)

Uploaded Source

Built Distribution

logsensei-0.3.2-py2.py3-none-any.whl (25.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file logsensei-0.3.2.tar.gz.

File metadata

  • Download URL: logsensei-0.3.2.tar.gz
  • Upload date:
  • Size: 44.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for logsensei-0.3.2.tar.gz
Algorithm Hash digest
SHA256 05490c25bca80298224f3b0b638de71600a6423529bc588971cd0ade73a646c0
MD5 e396105f6258deb5bc128422b16303e2
BLAKE2b-256 2d270c72efacb8992f7e57418535418fb6a467da5b04be8860ff55b85b2af7fe

See more details on using hashes here.

File details

Details for the file logsensei-0.3.2-py2.py3-none-any.whl.

File metadata

  • Download URL: logsensei-0.3.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for logsensei-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9813f83b28624e1612723e6a8a99c657f44a3646c7588d2c22d39a21e64142c9
MD5 8bbd9d01e623a142325687734bffca33
BLAKE2b-256 4d7008e0fb69e90b1c8eaac78f678150966b976354085521770b376547680e96

See more details on using hashes here.

Supported by

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