Project setup

This commit is contained in:
Craig
2025-04-29 10:19:22 +01:00
parent dd4583d737
commit 608c345ee3
5 changed files with 1852 additions and 0 deletions

26
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,26 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.7
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi ]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi ]
repos:
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.6.17
hooks:
- id: uv-lock

1
.python-version Normal file
View File

@@ -0,0 +1 @@
3.12

8
main.py Normal file
View File

@@ -0,0 +1,8 @@
import torch
def main():
print(torch.__version__)
print("Hello from attention-from-scratch!")
if __name__ == "__main__":
main()

32
pyproject.toml Normal file
View File

@@ -0,0 +1,32 @@
[project]
name = "attention-from-scratch"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ipykernel>=6.29.5",
"jupyter>=1.1.1",
"notebook>=7.4.1",
"numpy>=2.2.5",
"torch>=2.6.0",
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" },
]
torchvision = [
{ index = "pytorch-cu124", marker = "sys_platform == 'linux'" },
]
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[dependency-groups]
dev = [
"pre-commit>=4.2.0",
]

1785
uv.lock generated Normal file

File diff suppressed because it is too large Load Diff