Metadata-Version: 2.2
Name: p95
Version: 0.6.0
Summary: Python SDK for p95 ML experiment tracking
Author: NinetyFive
License: MIT
Project-URL: Homepage, https://github.com/numerataz/p95
Project-URL: Documentation, https://github.com/numerataz/p95
Project-URL: Repository, https://github.com/numerataz/p95
Keywords: ml,machine-learning,experiment-tracking,metrics,training
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Requires-Dist: websocket-client>=1.4.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: responses>=0.23.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"

# p95 Python SDK

Track ML experiments locally. No server setup required.

Installing the Python package includes the binary for the TUI and the web server.

## Install

```bash
pip install p95
```

## Usage

```python
from p95 import Run

with Run(project="my-project", name="experiment-1") as run:
    run.log_config({"learning_rate": 0.001, "epochs": 10})

    for epoch in range(10):
        loss = train_one_epoch()
        run.log_metrics({"loss": loss}, step=epoch)
```

## View Results

```bash
# Opens a dashboard at http://localhost:6767
pnf serve --logdir ~/.p95/logs

# Opens the TUI
pnf tui --logdir ~/.p95/logs
```

## API

```python
run.log_metrics({"loss": 0.5, "accuracy": 0.85}, step=epoch)  # Log metrics
run.log_config({"lr": 0.001})                                  # Log config
run.add_tags(["baseline"])                                     # Add tags
```

## Environment Variables

| Variable     | Description        | Default       |
| ------------ | ------------------ | ------------- |
| `P95_LOGDIR` | Where to save logs | `~/.p95/logs` |

## License

MIT
