forked from instructlab/instructlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
145 lines (130 loc) · 4.53 KB
/
pyproject.toml
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
134
135
136
137
138
139
140
141
142
143
144
145
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "instructlab"
authors = [{ name = "InstructLab", email = "[email protected]" }]
description = "CLI for interacting with InstructLab"
readme = "README.md"
license = { text = "Apache-2.0 AND MIT" }
requires-python = ">=3.10,<3.12"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
]
dynamic = ["dependencies", "optional-dependencies", "version"]
[project.scripts]
# defines ilab executable
ilab = "instructlab.lab:ilab"
[project.urls]
homepage = "https://instructlab.ai"
source = "https://github.com/instructlab/instructlab"
issues = "https://github.com/instructlab/instructlab/issues"
[tool.setuptools_scm]
version_file = "src/instructlab/_version.py"
# do not include +gREV local version, required for Test PyPI upload
local_scheme = "no-local-version"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }
optional-dependencies.hpu = { file = ["requirements-hpu.txt"] }
optional-dependencies.vllm-cuda = { file = ["requirements-vllm-cuda.txt"] }
[tool.setuptools.packages.find]
where = ["src"]
include = [
"instructlab",
"instructlab.chat",
"instructlab.generator",
"instructlab.train",
"instructlab.train.lora_mlx",
"instructlab.train.lora_mlx.models",
"instructlab.llamacpp",
"instructlab.mlx_explore",
]
[tool.check-wheel-contents]
# W002 - Wheel contains duplicate files:
# instructlab/mlx_explore/LICENSE
# instructlab/train/lora_mlx/LICENSE
ignore = ["W002"]
[tool.ruff]
target-version = "py39"
# same as black's default line length
line-length = 88
[tool.ruff.lint]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Fixers will be enabled gradually.
select = [
# "B", # flake8-bugbear
# "E", # pycodestyle
# "F", # Pyflakes
"Q", # flake8-quotes
# Ruff does not support isort's import_headings feature, yet.
# "I", # isort
# "UP", # pyupgrade
# "SIM", # flake8-simplify
"TID", # flake8-tidy-imports
]
ignore = [
# some embedded strings are longer than 88 characters
"E501", # line too long
"TID252", # Prefer absolute imports over relative imports from parent modules
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"yamllint".msg = "yamllint is for CLI usage only."
[tool.ruff.lint.isort]
# same as .isort.cfg
from-first = true
# not supported yet
# import-heading-future=Future
# import-heading-stdlib=Standard
# import-heading-thirdparty=Third Party
# import-heading-firstparty=First Party
# import-heading-localfolder=Local
known-local-folder = ["tuning"]
[tool.mypy]
disable_error_code = ["import-not-found", "import-untyped"]
exclude = [
"^src/instructlab/model/chat\\.py$",
"^src/instructlab/model/convert\\.py$",
"^src/instructlab/model/download\\.py$",
"^src/instructlab/model/test\\.py$",
"^src/instructlab/model/serve\\.py$",
"^src/instructlab/model/list\\.py$",
"^src/instructlab/model/model\\.py$",
"^src/instructlab/model/train\\.py$",
"^src/instructlab/model/evaluate\\.py$",
"^src/instructlab/config/config\\.py$",
"^src/instructlab/config/init\\.py$",
"^src/instructlab/data/data\\.py$",
"^src/instructlab/data/generate\\.py$",
"^src/instructlab/data/generator/generate_data\\.py$",
"^src/instructlab/data/generator/utils\\.py$",
"^src/instructlab/taxonomy/taxonomy\\.py$",
"^src/instructlab/taxonomy/diff\\.py$",
"^src/instructlab/llamacpp/llamacpp_convert_to_gguf\\.py$",
"^src/instructlab/mlx_explore/gguf_convert_to_mlx\\.py$",
"^src/instructlab/mlx_explore/utils\\.py$",
"^src/instructlab/train/lora_mlx/lora\\.py$",
"^src/instructlab/train/lora_mlx/models/llama\\.py$",
"^src/instructlab/train/lora_mlx/models/mixtral\\.py$",
"^src/instructlab/train/lora_mlx/models/models\\.py$",
"^src/instructlab/utils\\.py$",
"^src/instructlab/model/backends/llama_cpp\\.py$",
"^src/instructlab/model/backends/vllm\\.py$",
"^src/instructlab/model/backends/backends\\.py$",
]
# honor excludes by not following there through imports
follow_imports = "silent"