Skip to main content

TorchToolkit

PyPI version fury.io GitHub workflow GitHub license

Hi 👋, this is a small Python package containing useful functions to use with PyTorch. It includes utilities, metrics and sampling methods to use during and after training a model.

Feel free to use it, take the code for your projects, and raise an issue if you have question or a pull request if you want to contribute.

pip install torchtoolkit

It requires Python 3.8 or above.

Simplest example:

from torchtoolkit.metrics import Accuracy
from torch import randint, randn
from pathlib import Path

acc = Accuracy(mode='top_k', top_kp=5)
for _ in range(10):
    res = randn((16, 32))
    expected = randint(0, 32, (16, ))
    acc(res, expected)  # saving results
acc.save(Path('path', 'to', 'save', 'file.csv'))
acc.analyze()

I built it for my own usage, so you won't find documentation besides the docstring.

Metadata

Release files for torchtoolkit 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for torchtoolkit 0.0.4
File Size Uploaded Provenance
torchtoolkit-0.0.4.tar.gz 14.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for torchtoolkit 0.0.4
File Interpreter ABI Platform
torchtoolkit-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / torchtoolkit-0.0.4.tar.gz

Download URL torchtoolkit-0.0.4.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1aa7351afe41a834e724bbae162eb023f76f8f1cd3569e01a33bb6b5ed73ad24
BLAKE2b-256 checksum
How to use checksums
d815d58824cb66c1c34840b83e464db40c960ae58aa16f25f2a45ecf7a98de4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / torchtoolkit-0.0.4-py3-none-any.whl

Download URL torchtoolkit-0.0.4-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
680586004127abd99de48c0525d36349ccf35fc3fb7fa90dd338640ad31650a2
BLAKE2b-256 checksum
How to use checksums
9430af7e2f7953289a6877e600809f863ddf4649b6e753d3674178f2f7ede504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for torchtoolkit 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page