Metadata-Version: 2.4
Name: torchonn-pyutils
Version: 0.0.3.3
Summary: A collection of utility functions and modules for PyTorch and general Python usage.
Author: JeremieMelo
License: MIT License
        
        Copyright (c) 2021 Jiaqi Gu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/JeremieMelo/pyutility
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.19.2
Requires-Dist: tqdm>=4.56.0
Requires-Dist: torch>=2.6.0
Requires-Dist: torchvision>=0.10.0
Requires-Dist: matplotlib>=3.3.4
Requires-Dist: svglib>=1.1.0
Requires-Dist: scipy>=1.5.4
Requires-Dist: scikit-learn>=0.24.1
Requires-Dist: pyyaml>=5.1.1
Requires-Dist: ryaml>=0.4.0
Requires-Dist: multimethod>=1.12
Requires-Dist: scienceplots>=2.1.1
Requires-Dist: torchsummary>=1.5.1
Provides-Extra: tensorflow
Requires-Dist: tensorflow>=2.5.0; extra == "tensorflow"
Dynamic: license-file

<!--
 * @Date: 2024-06-16 13:06:59
 * @LastEditors: JeremieMelo jiaqigu@asu.edu
 * @LastEditTime: 2025-09-05 19:16:35
 * @FilePath: /pyutility/README.md
-->
# pyutils
A python/pytorch utility library

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

## News
- v0.0.3.2 available.
- v0.0.2 available. Added new datasets and quantization!
- v0.0.1 available. Feedbacks are highly welcomed!

## Installation
```bash
conda install scopex/label/ScopeX::torchonn-pyutils
```
```bash
pip install torchonn-pyutils --no-build-isolation
```
or install from cloned codes from github if you would like to modify the code (recommend)
```bash
git clone https://github.com/JeremieMelo/pyutility.git
cd pyutility
./setup.sh
```
To remove the package:
```bash
pip uninstall torchonn_pyutils
```

## Usage
```bash
import pyutils
```

## Features
- Support pytorch training utility and datasets.

## TODOs
- [ ] Support lr_scheduler
- [ ] Support trainer

## Dependencies
- Python >= 3.10
- PyTorch >= 2.0
- Tensorflow >= 2.5.0
- Others are listed in requirements.txt


## Files
| File      | Description |
| ----------- | ----------- |
| datasets/ | Defines different datasets and builder |
| loss/ | Defines different loss functions/criterions |
| optimizer/ | Defines different optimizers |
| lr_scheduler/ | Defines different learning rate schedulers |
| quant/ | Defines different weight/activation quantizers |
| activation.py      | Activation functions |
| compute.py   | functions related to computing |
| config.py   | Hierarchical yaml configuration file parser |
| distribution_sampler.py   | Sample from customized distributions |
| general.py   | Common helper functions |
| initializer.py   | Initialization methods for PyTorch Parameters |
| loss.py   | Loss functions for PyTorch model training |
| quantize.py   | Quantization functions |
| torch_train.py   | Helper functions for torch training |
| typing.py | Defines common types |


## Contact
Jiaqi Gu (jqgu@utexas.edu)
