hysts HF staff commited on
Commit
5a27beb
·
1 Parent(s): 0d11c3b
.pre-commit-config.yaml ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-executables-have-shebangs
6
+ - id: check-json
7
+ - id: check-merge-conflict
8
+ - id: check-shebang-scripts-are-executable
9
+ - id: check-toml
10
+ - id: check-yaml
11
+ - id: end-of-file-fixer
12
+ - id: mixed-line-ending
13
+ args: ["--fix=lf"]
14
+ - id: requirements-txt-fixer
15
+ - id: trailing-whitespace
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.8.4
18
+ hooks:
19
+ - id: ruff
20
+ args: ["--fix"]
21
+ - id: ruff-format
22
+ args: ["--line-length", "119"]
23
+ - repo: https://github.com/pre-commit/mirrors-mypy
24
+ rev: v1.14.0
25
+ hooks:
26
+ - id: mypy
27
+ args: ["--ignore-missing-imports"]
28
+ additional_dependencies:
29
+ [
30
+ "types-python-slugify",
31
+ "types-requests",
32
+ "types-PyYAML",
33
+ "types-pytz",
34
+ ]
35
+ - repo: https://github.com/kynan/nbstripout
36
+ rev: 0.8.1
37
+ hooks:
38
+ - id: nbstripout
39
+ args:
40
+ [
41
+ "--extra-keys",
42
+ "metadata.interpreter metadata.kernelspec cell.metadata.pycharm",
43
+ ]
44
+ - repo: https://github.com/nbQA-dev/nbQA
45
+ rev: 1.9.1
46
+ hooks:
47
+ - id: nbqa-black
48
+ - id: nbqa-pyupgrade
49
+ args: ["--py37-plus"]
50
+ - id: nbqa-isort
51
+ args: ["--float-to-top"]
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.10
.vscode/extensions.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "recommendations": [
3
+ "ms-python.python",
4
+ "charliermarsh.ruff",
5
+ "streetsidesoftware.code-spell-checker",
6
+ "tamasfe.even-better-toml"
7
+ ]
8
+ }
.vscode/settings.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "files.insertFinalNewline": false,
4
+ "[python]": {
5
+ "editor.defaultFormatter": "charliermarsh.ruff",
6
+ "editor.formatOnType": true,
7
+ "editor.codeActionsOnSave": {
8
+ "source.fixAll.ruff": "explicit",
9
+ "source.organizeImports": "explicit"
10
+ }
11
+ },
12
+ "[jupyter]": {
13
+ "files.insertFinalNewline": false
14
+ },
15
+ "notebook.output.scrolling": true,
16
+ "notebook.formatOnCellExecution": true,
17
+ "notebook.formatOnSave.enabled": true,
18
+ "notebook.codeActionsOnSave": {
19
+ "source.organizeImports": "explicit"
20
+ }
21
+ }
pyproject.toml ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "llama-3-2-3b-instruct"
3
+ version = "0.1.0"
4
+ description = ""
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "accelerate>=1.2.1",
9
+ "gradio>=5.9.1",
10
+ "hf-transfer>=0.1.8",
11
+ "spaces>=0.31.1",
12
+ "torch==2.4.0",
13
+ "transformers>=4.47.1",
14
+ ]
15
+
16
+ [tool.ruff]
17
+ line-length = 119
18
+
19
+ [tool.ruff.lint]
20
+ select = ["ALL"]
21
+ ignore = [
22
+ "COM812", # missing-trailing-comma
23
+ "D203", # one-blank-line-before-class
24
+ "D213", # multi-line-summary-second-line
25
+ "E501", # line-too-long
26
+ "SIM117", # multiple-with-statements
27
+ ]
28
+ extend-ignore = [
29
+ "D100", # undocumented-public-module
30
+ "D101", # undocumented-public-class
31
+ "D102", # undocumented-public-method
32
+ "D103", # undocumented-public-function
33
+ "D104", # undocumented-public-package
34
+ "D105", # undocumented-magic-method
35
+ "D107", # undocumented-public-init
36
+ "EM101", # raw-string-in-exception
37
+ "FBT001", # boolean-type-hint-positional-argument
38
+ "FBT002", # boolean-default-value-positional-argument
39
+ "PD901", # pandas-df-variable-name
40
+ "PGH003", # blanket-type-ignore
41
+ "PLR0913", # too-many-arguments
42
+ "PLR0915", # too-many-statements
43
+ "TRY003", # raise-vanilla-args
44
+ ]
45
+ unfixable = [
46
+ "F401", # unused-import
47
+ ]
48
+
49
+ [tool.ruff.format]
50
+ docstring-code-format = true
uv.lock ADDED
The diff for this file is too large to render. See raw diff