prochet commited on
Commit
61f4ff3
Β·
1 Parent(s): 7229448

Refactor code structure for improved readability and maintainability

Browse files
Files changed (5) hide show
  1. .gitignore +5 -0
  2. .python-version +1 -0
  3. modeling_schp.py +4 -1
  4. pyproject.toml +12 -0
  5. uv.lock +0 -0
.gitignore CHANGED
@@ -12,3 +12,8 @@ onnx/*.data
12
  !onnx/schp-atr-18.onnx.data
13
  !onnx/schp-atr-18-int8-static.onnx
14
  !onnx/schp-atr-18-int8-dynamic.onnx
 
 
 
 
 
 
12
  !onnx/schp-atr-18.onnx.data
13
  !onnx/schp-atr-18-int8-static.onnx
14
  !onnx/schp-atr-18-int8-dynamic.onnx
15
+
16
+
17
+ .venv/
18
+ .pytest_cache/
19
+ .DS_Store
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.12
modeling_schp.py CHANGED
@@ -16,7 +16,10 @@ import torch.nn.functional as F
16
  from transformers import PreTrainedModel
17
  from transformers.utils import ModelOutput
18
 
19
- from schp.configuration_schp import SCHPConfig
 
 
 
20
 
21
 
22
  # ── Pure-PyTorch InPlaceABNSync shim ──────────────────────────────────────────
 
16
  from transformers import PreTrainedModel
17
  from transformers.utils import ModelOutput
18
 
19
+ try:
20
+ from .configuration_schp import SCHPConfig # ty:ignore[unresolved-import]
21
+ except ImportError:
22
+ from configuration_schp import SCHPConfig
23
 
24
 
25
  # ── Pure-PyTorch InPlaceABNSync shim ──────────────────────────────────────────
pyproject.toml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "schp-atr-18"
3
+ version = "0.1.0"
4
+ readme = "README.md"
5
+ requires-python = ">=3.12"
6
+ dependencies = [
7
+ "pillow>=12.2.0",
8
+ "pytest>=9.0.3",
9
+ "torch>=2.11.0",
10
+ "torchvision>=0.26.0",
11
+ "transformers>=5.5.3",
12
+ ]
uv.lock ADDED
The diff for this file is too large to render. See raw diff