Spaces:
Sleeping
Sleeping
File size: 1,883 Bytes
2d52135 b22e8ba 2d52135 4f973e3 2d52135 b22e8ba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | [project]
name = "mini-transformer"
version = "0.1.0"
description = "A mini encoder–decoder transformer implementation"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "Ala Boussoffara" }
]
dependencies = [
"torch>=2.3",
"numpy",
"transformers",
"omegaconf",
"hydra-core",
"tokenizers",
"datasets",
"huggingface_hub",
]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"ruff",
"black",
"mypy",
"pre-commit",
"httpx",
"fastapi",
"uvicorn[standard]",
"chainlit",
"matplotlib",
"jupyterlab"
]
server = [
"fastapi",
"uvicorn[standard]",
"chainlit",
]
viz = [
"matplotlib",
]
notebook = [
"jupyterlab",
]
evaluation = [
"evaluate",
"sacrebleu",
"rouge-score",
"bert-score",
"tqdm",
]
[project.scripts]
mini-transformer-infer = "mini_transformer.cli:infer_main"
mini-transformer-serve = "mini_transformer.cli:serve_main"
mini-transformer-ui = "mini_transformer.cli:ui_main"
mini-transformer-fetch = "mini_transformer.cli:fetch_main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.package-data]
"mini_transformer" = ["conf/**/*.yaml"]
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q"
testpaths = ["tests"]
[tool.black]
line-length = 100
target-version = ["py310"]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["E","F","I","B","UP"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.11"
strict = false
ignore_missing_imports = true
# Make mypy understand the src/ layout
files = ["src"]
mypy_path = ["src"]
explicit_package_bases = true
[tool.isort]
profile = "black"
line_length = 100
known_first_party = ["mini_transformer", "tests"]
combine_as_imports = true
|