Skip to content

Commit fe383c2

Browse files
pravin-unstructuredEC2 Default Userqued
authored
Initial commit for removing super-gradients dependencies and allowing… (#287)
… general exported Onnx Object detections models to be used. Still figuring out how to build unit test. --------- Co-authored-by: EC2 Default User <[email protected]> Co-authored-by: Alan Bertl <[email protected]> Co-authored-by: qued <[email protected]>
1 parent f35b830 commit fe383c2

File tree

17 files changed

+193
-510
lines changed

17 files changed

+193
-510
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
path: |
2121
.venv
2222
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('requirements/*.txt') }}
23+
lookup-only: true
2324
- name: Set up Python ${{ env.PYTHON_VERSION }}
2425
uses: actions/setup-python@v4
2526
with:
@@ -88,11 +89,18 @@ jobs:
8889
run: |
8990
sudo apt-get update
9091
sudo apt-get -y install poppler-utils tesseract-ocr
92+
- name: Configure AWS credentials
93+
uses: aws-actions/configure-aws-credentials@v4
94+
with:
95+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
96+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
97+
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
9198
- name: Test
9299
env:
93100
UNSTRUCTURED_HF_TOKEN: ${{ secrets.HF_TOKEN }}
94101
run: |
95102
source .venv/bin/activate
103+
aws s3 cp s3://utic-dev-models/ci_test_model/test_ci_model.onnx test_unstructured_inference/models/
96104
CI=true make test
97105
make check-coverage
98106

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.7.14
2+
3+
* enhancement: Remove Super-Gradients Dependency and Allow General Onnx Models Instead
4+
15
## 0.7.13
26

37
* refactor: add a class `ElementType` for the element type constants and use the constants to replace element type strings

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
include requirements/base.in
2-
include requirements/sg.in

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ install-base: install-base-pip-packages
1919

2020
## install: installs all test, dev, and experimental requirements
2121
.PHONY: install
22-
install: install-base-pip-packages install-dev install-sg install-detectron2
22+
install: install-base-pip-packages install-dev install-detectron2
2323

2424
.PHONY: install-ci
25-
install-ci: install-base-pip-packages install-test install-sg install-paddleocr
25+
install-ci: install-base-pip-packages install-test install-paddleocr
2626

2727
.PHONY: install-base-pip-packages
2828
install-base-pip-packages:
@@ -46,10 +46,6 @@ install-test: install-base
4646
install-dev: install-test
4747
pip install -r requirements/dev.txt
4848

49-
.PHONY: install-sg
50-
install-sg: install-base
51-
pip install -r requirements/sg.txt
52-
5349
## pip-compile: compiles all base/dev/test requirements
5450
.PHONY: pip-compile
5551
pip-compile:
@@ -60,8 +56,6 @@ pip-compile:
6056
sed 's/^detectron2 @/# detectron2 @/g' requirements/base.txt
6157
pip-compile --upgrade requirements/test.in
6258
pip-compile --upgrade requirements/dev.in
63-
pip-compile --upgrade requirements/sg.in
64-
6559

6660
#################
6761
# Test and Lint #

requirements/base.txt

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@ certifi==2023.7.22
1010
# via requests
1111
cffi==1.16.0
1212
# via cryptography
13-
charset-normalizer==3.3.0
13+
charset-normalizer==3.3.2
1414
# via
1515
# pdfminer-six
1616
# requests
1717
coloredlogs==15.0.1
1818
# via onnxruntime
1919
contourpy==1.1.1
2020
# via matplotlib
21-
cryptography==41.0.4
21+
cryptography==41.0.5
2222
# via pdfminer-six
2323
cycler==0.12.1
2424
# via matplotlib
2525
effdet==0.4.1
2626
# via layoutparser
27-
filelock==3.12.4
27+
filelock==3.13.1
2828
# via
2929
# huggingface-hub
3030
# torch
3131
# transformers
3232
flatbuffers==23.5.26
3333
# via onnxruntime
34-
fonttools==4.43.1
34+
fonttools==4.44.3
3535
# via matplotlib
36-
fsspec==2023.9.2
36+
fsspec==2023.10.0
3737
# via
3838
# huggingface-hub
3939
# torch
40-
huggingface-hub==0.17.3
40+
huggingface-hub==0.19.4
4141
# via
4242
# -r requirements/base.in
4343
# timm
@@ -47,7 +47,7 @@ humanfriendly==10.0
4747
# via coloredlogs
4848
idna==3.4
4949
# via requests
50-
importlib-resources==6.1.0
50+
importlib-resources==6.1.1
5151
# via matplotlib
5252
iopath==0.1.10
5353
# via layoutparser
@@ -65,9 +65,8 @@ mpmath==1.3.0
6565
# via sympy
6666
networkx==3.1
6767
# via torch
68-
numpy==1.23.0
68+
numpy==1.24.4
6969
# via
70-
# -c requirements/constraints.in
7170
# contourpy
7271
# layoutparser
7372
# matplotlib
@@ -81,7 +80,7 @@ numpy==1.23.0
8180
# transformers
8281
omegaconf==2.3.0
8382
# via effdet
84-
onnx==1.14.1
83+
onnx==1.15.0
8584
# via -r requirements/base.in
8685
onnxruntime==1.15.1
8786
# via -r requirements/base.in
@@ -102,9 +101,9 @@ pdf2image==1.16.3
102101
# via layoutparser
103102
pdfminer-six==20221105
104103
# via pdfplumber
105-
pdfplumber==0.10.2
104+
pdfplumber==0.10.3
106105
# via layoutparser
107-
pillow==10.0.1
106+
pillow==10.1.0
108107
# via
109108
# layoutparser
110109
# matplotlib
@@ -114,7 +113,7 @@ pillow==10.0.1
114113
# torchvision
115114
portalocker==2.8.2
116115
# via iopath
117-
protobuf==4.24.4
116+
protobuf==4.25.1
118117
# via
119118
# onnx
120119
# onnxruntime
@@ -124,7 +123,7 @@ pycparser==2.21
124123
# via cffi
125124
pyparsing==3.1.1
126125
# via matplotlib
127-
pypdfium2==4.21.0
126+
pypdfium2==4.24.0
128127
# via pdfplumber
129128
pytesseract==0.3.10
130129
# via layoutparser
@@ -143,7 +142,7 @@ pyyaml==6.0.1
143142
# omegaconf
144143
# timm
145144
# transformers
146-
rapidfuzz==3.4.0
145+
rapidfuzz==3.5.2
147146
# via -r requirements/base.in
148147
regex==2023.10.3
149148
# via transformers
@@ -164,17 +163,17 @@ sympy==1.12
164163
# via
165164
# onnxruntime
166165
# torch
167-
timm==0.9.7
166+
timm==0.9.10
168167
# via effdet
169-
tokenizers==0.14.1
168+
tokenizers==0.15.0
170169
# via transformers
171-
torch==2.1.0
170+
torch==2.1.1
172171
# via
173172
# effdet
174173
# layoutparser
175174
# timm
176175
# torchvision
177-
torchvision==0.16.0
176+
torchvision==0.16.1
178177
# via
179178
# effdet
180179
# layoutparser
@@ -184,17 +183,16 @@ tqdm==4.66.1
184183
# huggingface-hub
185184
# iopath
186185
# transformers
187-
transformers==4.34.0
186+
transformers==4.35.2
188187
# via -r requirements/base.in
189188
typing-extensions==4.8.0
190189
# via
191190
# huggingface-hub
192191
# iopath
193-
# onnx
194192
# torch
195193
tzdata==2023.3
196194
# via pandas
197-
urllib3==2.0.6
195+
urllib3==2.1.0
198196
# via requests
199197
zipp==3.17.0
200198
# via importlib-resources

requirements/constraints.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
numpy<=1.23

0 commit comments

Comments
 (0)