forked from facebookresearch/SONAR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (115 loc) · 2.88 KB
/
pyproject.toml
File metadata and controls
133 lines (115 loc) · 2.88 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[build-system]
requires = ["flit_core>=3.2,<4", "setuptools"]
build-backend = "flit_core.buildapi"
# wheel~=0.40.0
[project]
name = "sonar-space"
readme = "README.md"
authors = [{name = "Meta AI Research"}]
requires-python = ">=3.10"
dynamic = ["version", "description"]
keywords = ["sentence embeddings", "sentence representation", "sentence encoder",
"sonar models", "speech2speech", "text2text", "speech2text",
"text2speech", "multi-modal models", "multi-language models"]
# zip_safe = false
classifiers=[
"Topic :: Scientific/Engineering",
"Development Status :: 4 - Beta",
]
dependencies = [
# fairseq2 is installed with the cpu deps; if you want a gpu build, you need to install it manually.
# see https://github.com/facebookresearch/fairseq2
"fairseq2~=0.4.0",
"numpy>=1.21",
"torch",
"torchaudio",
"sox",
"soundfile",
"tqdm",
"typing_extensions",
]
[project.optional-dependencies]
dev = [
# Test
"pytest>=4.3.0",
"pytest-asyncio>=0.15.0",
"pytest-cov>=2.6.1",
"coverage[toml]>=5.1",
# Format
"black==22.3.0",
"isort>=5.10.1",
# Linters
"mypy>=0.782",
"pylint>=2.8.0",
]
cpu = [
"torch==2.5.1+cpu",
"torchaudio==2.5.1+cpu",
"fairseq2n~=0.4.0",
"fairseq2~=0.4.0",
]
hg = [
"transformers>=4.44.0",
"datasets>=2.20.0",
"evaluate>=0.4.2",
"rouge_score>=0.1.2",
"nltk>=3.9",
"absl-py>=2.1.0",
]
[project.urls]
Source = "https://github.com/facebookresearch/SONAR"
Tracker = "https://github.com/facebookresearch/SONAR/issues"
[project.entry-points."fairseq2.extension"]
"fairseq2" = "sonar:setup_fairseq2_extension"
[tool.flit.module]
name = "sonar"
[tool.black]
line-length = 88
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
^/foo.py # exclude a file named foo.py in the root of the project
| .*_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the project
)
'''
[tool.flake8]
extend_ignore = ["E", "Y"] # Black
per-file-ignores = [
"__init__.py:F401",
]
[tool.isort]
profile = "black"
skip_gitignore = true
skip_glob = []
[tool.mypy]
disable_error_code = "type-abstract"
python_version = "3.10"
show_error_codes = true
check_untyped_defs = true
files = [
"sonar/"
]
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests/"]
python_files = ["test_*.py"]
[tool.uv.sources]
fairseq2 = [
{ index = "fairseq2-cpu", extra = 'cpu' }
]
fairseq2n = [
{ index = "fairseq2-cpu", extra = 'cpu' }
]
torch={index="pytorch-cpu"}
torchaudio={index="pytorch-cpu"}
[[tool.uv.index]]
name = "fairseq2-cpu"
url = "https://fair.pkg.atmeta.com/fairseq2/whl/rc/pt2.5.1/cpu/"
explicit = true
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true