Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 0 additions & 131 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,132 +1 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE stuff
.idea/
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"tombi-toml.tombi"
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ A standalone library for adding <a href="https://arxiv.org/abs/2104.09864">rotar

My gut also tells me there is something <a href="https://www.nature.com/articles/s41593-021-00821-9">more</a> to rotations that can be exploited in artificial neural networks.

[Potential successor](https://github.com/lucidrains/PoPE-pytorch)

## Install

### Using pip
Expand Down
124 changes: 60 additions & 64 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
[project]
name = "rotary-embedding-torch"
version = "0.8.8"
version = "0.8.9"
description = "Rotary Embedding - Pytorch"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Phil Wang", email = "lucidrains@gmail.com"}
]
keywords = [
"artificial intelligence",
"deep learning",
"positional embedding"
]
requires-python = ">=3.12"
license = "MIT"
authors = [{ name = "Phil Wang", email = "lucidrains@gmail.com" }]
keywords = ["artificial intelligence", "deep learning", "positional embedding"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.9"
dependencies = [
"einops>=0.7",
"torch>=2.0",
"einops>=0.7",
"hunterMakesPy>=0.5.3",
"torch>=2.0",
"torch-einops-kit>=0.1.1",
]

[project.urls]
Expand All @@ -35,39 +28,27 @@ Repository = "https://github.com/lucidrains/rotary-embedding-torch"

[dependency-groups]
dev = [
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"coverage>=7.10.0",
"ruff>=0.12.5",
"coverage>=7.10.0",
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"ruff>=0.12.5",
]
testing = ["numpy"]

[tool.ruff]
target-version = "py39"
line-length = 120
[build-system]
requires = ["uv_build>=0.11.6,<0.12.0"]
build-backend = "uv_build"

[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"N", # pep8-naming
"ANN", # annotations
"S", # bandit
"A", # builtins
"C4", # comprehensions
"EM", # errmsg
"ICN", # import-conventions
"PIE", # pie
"PT", # pytest-style
"RSE", # raise
"RET", # return
"TID", # tidy-imports
"ARG", # unused-arguments
"TD", # todos
"PL", # pylint
"FLY", # flynt
"FA", # flake8-future-annotations
[tool.coverage.run]
source = ["src/rotary_embedding_torch"]
omit = ["tests/*"]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError"
]

[tool.pydoclint]
Expand All @@ -76,18 +57,33 @@ arg-type-hints-in-docstring = false
check-return-types = false
check-yield-types = false

[tool.coverage.run]
source = ["rotary_embedding_torch"]
omit = ["tests/*"]
[tool.ruff]
line-length = 140

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"N", # pep8-naming
"ANN", # annotations
"S", # bandit
"A", # builtins
"C4", # comprehensions
"EM", # errmsg
"ICN", # import-conventions
"PIE", # pie
"PT", # pytest-style
"RSE", # raise
"RET", # return
"TID", # tidy-imports
"ARG", # unused-arguments
"TD", # todos
"PL", # pylint
"FLY", # flynt
"FA", # flake8-future-annotations
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
default-groups = "all"
8 changes: 0 additions & 8 deletions rotary_embedding_torch/__init__.py

This file was deleted.

Loading