logsensei
Logger for Data Scientist - 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
- Aditya Kelvianto Sidharta
- Github: https://github.com/AdityaSidharta
- Personal Website: https://adityasidharta.com/
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for logsensei 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| logsensei-1.0.0.tar.gz | 44.1 kB | Without provenance | Details for logsensei-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| logsensei-1.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for logsensei-1.0.0-py2.py3-none-any.whl |
Total release size: 69.8 kB
Release files / logsensei-1.0.0.tar.gz
| Download URL | logsensei-1.0.0.tar.gz |
|---|---|
| Size | 44.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c43b40cba03ed8da66ebbb762ecb915ea9949bff3379657572607851385c6625
|
|
BLAKE2b-256 checksum How to use checksums |
887855ebade19aead4026376d607429608f1afbc43f29715a66aa93404d13bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.22.0
|
Release files / logsensei-1.0.0-py2.py3-none-any.whl
| Download URL | logsensei-1.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
54b09967f1c48fa85af8048c19284257aaa0b9e1d3f97346389e3956c7381e83
|
|
BLAKE2b-256 checksum How to use checksums |
b2f897ce438a630a4e2ff42a04afa4016efa40784c0640d016fecb508734beb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.22.0
|
Security for logsensei 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.