No project description provided
Project description
NiceTrace
NiceTrace is a Python module for user-friendly structured tracing and elegant display of resulting traces. Traces are stored as plain JSON files. NiceTrace support exploring traces of running processes. While designed for generic usage, it's particularly well-suited for tracing experiments with Large Language Models (LLMs).
Documentation
Installation
# For tracing only
pip install nicetrace
# For tracing & displaying traces
pip install nicetrace[server]
Getting started
Here's how to create a simple trace and write it to a JSON file:
from nicetrace import trace, FileWriter
with FileWriter("traces/my_trace.json"):
with trace("Root node"):
with trace("Child node", inputs={"x": 10, "y": 20}) as node:
node.add_output("", "Hello world!")
To start a traceview server over the traces directory:
python3 -m nicetrace.server traces
Then, open your web browser and navigate to http://localhost:4090 to view your traces.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nicetrace-0.4.10.tar.gz.
File metadata
- Download URL: nicetrace-0.4.10.tar.gz
- Upload date:
- Size: 750.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d9d2fbe03375f8f01fc4f077a6f5f802c74756b58422ae932a6bfbad5849fde
|
|
| MD5 |
5664fed876b8ac0ab4c6c45837f6eeee
|
|
| BLAKE2b-256 |
0b7c8c19aef6a348a284cae7e948b53d923d1efee0ea443623f8d3143e1efc54
|
File details
Details for the file nicetrace-0.4.10-py3-none-any.whl.
File metadata
- Download URL: nicetrace-0.4.10-py3-none-any.whl
- Upload date:
- Size: 120.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d8fcc147898d30b625f63b15897491563442cf5e285f8197e97e076e46c1163
|
|
| MD5 |
505e1174b46e9e38f3c26174b5ee4f62
|
|
| BLAKE2b-256 |
6e7765f952b126b75d18d5293b281e599c521e03a102ed787f0a40bbd0435372
|