Skip to content

dvolgyes/flake8_tensors

Repository files navigation

flake8_tensors

pyversion PyPI - License

flake8 plugin which recommends some tricks for machine learning codes.

Installation

The plugin requires python3.8+.

Install the stable version: pip install flake8_tensors --upgrade

Or with pipx: pipx install flake8 pipx inject flake8 flake8_tensors

Usage

After the code is installed, call flake8 on your project. The plugin emits warning messages with "WT" prefix, e.g. WT100.

The messages meant to refer my opinionated best practices, or cool projects, like einops, opt_einsum, Adabelief, etc.

If you don't understand a warning, open a ticket, and i will clarify it. If you have suggestions, let me know. And of course, if you find a false positive, share the problematic snippet. (False positives are absolutely possible, actually, quite easy to make one. But assuming reasonable developer practices, like not calling your variable as "BatchNorm3d", the false positive rate should be low.)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published