-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codebase standards + update TF layers (#318)
* add gitignore rule for .personal files * resolve all complains from current ruff * add ruff's W rule, fix ruff's complains * resolve ruff's deprecation * apply ruff formatting to whole codebase * add pre-commit-config * add ruff checks to github CI * improve comments in test * more ruff config * EinMix: minor improvements in documentation * update layers to be TF 2.16 - compatible * increase timeout for cell execution in notebook * skip tests for previos TF versions
- Loading branch information
1 parent
2ab5c2a
commit cff63f2
Showing
34 changed files
with
592 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.4.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [ python, pyi, jupyter ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [ python, pyi, jupyter ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
__author__ = 'Alex Rogozhnikov' | ||
__version__ = '0.7.0' | ||
# imports can use EinopsError class | ||
# ruff: noqa: E402 | ||
|
||
__author__ = "Alex Rogozhnikov" | ||
__version__ = "0.7.0" | ||
|
||
|
||
class EinopsError(RuntimeError): | ||
""" Runtime error thrown by einops """ | ||
"""Runtime error thrown by einops""" | ||
|
||
pass | ||
|
||
|
||
__all__ = ['rearrange', 'reduce', 'repeat', 'einsum', | ||
'pack', 'unpack', | ||
'parse_shape', 'asnumpy', 'EinopsError'] | ||
__all__ = ["rearrange", "reduce", "repeat", "einsum", "pack", "unpack", "parse_shape", "asnumpy", "EinopsError"] | ||
|
||
from .einops import rearrange, reduce, repeat, einsum, parse_shape, asnumpy | ||
from .packing import pack, unpack | ||
from .packing import pack, unpack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.