semvec/pypi-packages huggingface dataset:
gradviz 0.1.2
Lightweight gradient visualizer for PyTorch: record gradient norms and plot flows by layer/param.
License: MIT
Requires Python: >=3.8

# gradviz

[![PyPI version](https://badge.fury.io/py/gradviz.svg)](https://badge.fury.io/py/gradviz)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Lightweight gradient visualizer for PyTorch**  
Record gradient norms per parameter/layer during training, save them to CSV, and visualize gradient flow with line plots or heatmaps.

---

## 🚀 Why gradviz?

Training deep neural networks often runs into **vanishing/exploding gradients** problems. Debugging these issues usually means writing boilerplate hooks or printing raw tensors.  
**gradviz** makes this simple:

- Attach once to your model
- Train as usual
- Save & visualize gradient norms across layers or parameters

Perfect for **students**, **researchers**, and anyone learning how backpropagation behaves.

---

## 📦 Installation

```bash
pip install gradviz
```

## ⚡ Quickstart

```python
from gradviz import GradViz

gv = GradViz(model)
gv.attach()

for epoch in range(epochs):
    gv.set_epoch(epoch)
    for x, y in loader:
        opt.zero_grad()
        loss = model(x).loss(y)
        loss.backward()
        opt.step()
        gv.step()

gv.detach()
gv.save("gradviz.csv")
gv.plot(by="layer", topk=20)
gv.heatmap(by="layer", at_step=1000)
```

## 🖼️ Example Plots

Line plot of gradient norms over steps
![Line plot](https://raw.githubusercontent.com/namanchhaparia06/gradviz/main/gradviz_logs/lines.png)

Heatmap of gradient norms by layer
![Heatmap](https://raw.githubusercontent.com/namanchhaparia06/gradviz/main/gradviz_logs/heatmap.png)

## 🔧 Features

- Record gradient L2 norms during training
- Works with any PyTorch model
- Save to CSV for later analysis
- Visualize:
  1. Line plots (by="layer" or by="param")
  2. Heatmaps at specific steps
- Lightweight (depends only on torch, numpy, pandas, matplotlib)
- Command-line interface (CLI) included

## CLI Usage

```bash
gradviz plot gradviz.csv --by layer --topk 15
gradviz heatmap gradviz.csv --by param --step 500
```

## API Reference

```python
from gradviz import GradViz, GradVizConfig
```

1. GradViz(model, config=None) → main class
2. .attach() → hook gradients
3. .detach() → remove hooks
4. .step() → call after optimizer.step()
5. .set_epoch(epoch) → optionally record epoch index
6. .save(path) → save collected gradients to CSV
7. .plot(by="layer"|"param", topk=20) → line plots
8. .heatmap(by="layer"|"param", at_step=...) → heatmap

## 📂 Examples

See examples/demo_mnist.py for a full MNIST training demo.

[![PyPI version](https://img.shields.io/pypi/v/gradviz.svg)](https://pypi.org/project/gradviz/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub Release](https://img.shields.io/github/v/release/namanchhaparia06/gradviz)](https://github.com/namanchhaparia06/gradviz/releases)
sfrbox-api 0.1.0
SFR Box API
License: MIT
Requires Python: <4.0,>=3.10
Keywords: sfrbox, router

# SFR Box API

[![PyPI](https://img.shields.io/pypi/v/sfrbox-api.svg)][pypi_]
[![Status](https://img.shields.io/pypi/status/sfrbox-api.svg)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/sfrbox-api)][python version]
[![License](https://img.shields.io/pypi/l/sfrbox-api)][license]

[![Read the documentation at https://sfrbox-api.readthedocs.io/](https://img.shields.io/readthedocs/sfrbox-api/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/hacf-fr/sfrbox-api/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/hacf-fr/sfrbox-api/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi_]: https://pypi.org/project/sfrbox-api/
[status]: https://pypi.org/project/sfrbox-api/
[python version]: https://pypi.org/project/sfrbox-api
[read the docs]: https://sfrbox-api.readthedocs.io/
[tests]: https://github.com/hacf-fr/sfrbox-api/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/hacf-fr/sfrbox-api
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Features

- TODO

## Requirements

- TODO

## Installation

You can install _SFR Box API_ via [pip] from [PyPI]:

```console
$ pip install sfrbox-api
```

## Usage

Please see the [Command-line Reference] for details.

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide].

## License

Distributed under the terms of the [MIT license][license],
_SFR Box API_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/hacf-fr/sfrbox-api/issues
[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/hacf-fr/sfrbox-api/blob/main/LICENSE
[contributor guide]: https://github.com/hacf-fr/sfrbox-api/blob/main/CONTRIBUTING.md
[command-line reference]: https://sfrbox-api.readthedocs.io/en/latest/usage.html
tinytable 0.18.1
Pure Python lite version of Pandas DataFrame.
License: MIT
Requires Python: >=3.8
Keywords: dataframe, table, data, csv, excel, sqlite

tinytable
=========

Pure Python, lightweight DataFrame-like table for small datasets. Zero C extensions. Friendly API inspired by pandas, but tiny.

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Tests](https://github.com/eddiethedean/tinytable/workflows/CI/badge.svg)](https://github.com/eddiethedean/tinytable/actions)

Installation
------------

```bash
pip install tinytable
```

Supports Python 3.8–3.13.

Quickstart
----------

```python
from tinytable import Table, read_csv, read_excel, read_sqlite

# Read from files
t1 = read_csv('tests/data/people.csv')
t2 = read_excel('tests/data/people.xlsx', sheet_name='Sheet1')
t3 = read_sqlite('tests/data/data.db', 'people')

# Construct manually
t = Table({'id': [1, 2, 3], 'name': ['a', 'b', 'c']}, labels=[('r1',), ('r2',), ('r3',)])

# Column/row access
ids = t['id']           # Column
row1 = t[0]             # Row
subset = t[['id']]      # New Table with only id

# Filter and slice
adults = t[t['id'] > 1] # boolean filter
head = t[:2]            # slice rows

# Edit
t.edit_value('name', 0, 'z')
t2 = t.edit_column('id', [10, 20, 30], inplace=False)

# IO
t.to_csv('out.csv')
t.to_excel('out.xlsx', sheet_name='Sheet1')
t.to_sqlite('out.db', table_name='people', primary_key='id', replace_table=True)
```

Features
--------

- **Pure Python**: No C extensions, easy to install and debug
- **Pandas-like API**: Familiar interface for data manipulation
- **Multiple I/O formats**: CSV, Excel, SQLite support
- **Type-safe**: Full mypy type checking support
- **Well-tested**: Comprehensive test suite with 76% coverage (235 tests)
- **Modern packaging**: Uses `pyproject.toml` and supports Python 3.8-3.13

API surface
-----------

- `Table`: core container with column/row operations, `head`, `tail`, joins, group stats, NA ops.
- Readers: `read_csv`, `read_excel`, `read_sqlite`.
- Writers: `to_csv`, `to_excel`, `to_sqlite`.

Development
-----------

This package has been fully modernized with:

- ✅ **Modern Python packaging** (`pyproject.toml`)
- ✅ **Comprehensive testing** (pytest with 235 tests, all passing)
- ✅ **Type safety** (mypy strict checking)
- ✅ **Code quality** (ruff linting and formatting)
- ✅ **CI/CD** (GitHub Actions)
- ✅ **100% backward compatibility**

Contributing
------------

PRs welcome. Run tests and linters:

```bash
pip install -e .[dev]
pytest -q
mypy tinytable
ruff check .
ruff format .
```

Notes
-----

- This release (v0.18.1) includes comprehensive modernization, bug fixes, improved type safety, and robust empty table handling.
- See `CHANGELOG.md` for detailed release notes.