python-dprint
An easy-to-use debug print tool for deep learning studies in python. DEMO
Why we need it?
The built-in debugger is great, however, for some reason, we may still want to print them out for debugging purpose. For such scenarios, we would like it to have the following feats. (especially when running deep learning projects - where our monitoring/debugging variables are being updated within loops).
-
Context Info. We may like to display the invoking positions for these variables (to help us identify back each of them), including their file name, func name, and line number.
-
Different Color. We may like it to be clearly distinguishable from tons of normal printings within loops, such as displaying training loss. The default color is YELLOW now, which could be custmozed in future releases soon (full color-code can be found here).
-
Pass-Through Print. We may like to monitor things without breaking current code structure, i.e., print-and-return. Note: you can still simply
dprint()them (just like print() in python) - it's compatible to both usecases.
#loss = loss1 + loss2
loss = loss1 + dprint(loss2)
- (Optional) Multiple Variables. We may not like to leave too much dprint() statement in our code - they look redundent - instead, we may like to display multiple variable within lines as less as possible (by passing them all as a dict).
How we use it?
Very easy :)
- Installation
pip install pydprint
- Import
from pydprint import dprint
- Demo Usecases: demo.py (see some examples).
Metadata
Release files for pydprint 0.0.4
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 | |
|---|---|---|---|---|
| pydprint-0.0.4.tar.gz | 3.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydprint-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / pydprint-0.0.4.tar.gz
| Download URL | pydprint-0.0.4.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f3ee9791a5233f7b3f2ea9944c4f8ce7ddb276b4eb2d381036e333e758cc1ef
|
|
BLAKE2b-256 checksum How to use checksums |
e55cf9887fd6ba912a8b6da7dbb8f81b6fc639c592f9fccfeb6279acb2a046c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.1 importlib-metadata/4.6.4 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11
|
Release files / pydprint-0.0.4-py3-none-any.whl
| Download URL | pydprint-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14376674280cde1615715b5899e1c91c68a485e35a561956ecba2ab2bd6ce3e9
|
|
BLAKE2b-256 checksum How to use checksums |
ba0bcd7e57b8df8e06fc945e7aa615ccc4638f1def694a41f4c66a172a79c242
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.1 importlib-metadata/4.6.4 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.11
|
Security for pydprint 0.0.4
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.