faster-table-recognizer 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- faster_table_recognizer-0.1.0/.cargo/config.toml +8 -0
- faster_table_recognizer-0.1.0/.github/workflows/CI.yml +67 -0
- faster_table_recognizer-0.1.0/.gitignore +7 -0
- faster_table_recognizer-0.1.0/Cargo.lock +1038 -0
- faster_table_recognizer-0.1.0/Cargo.toml +38 -0
- faster_table_recognizer-0.1.0/LICENSE +26 -0
- faster_table_recognizer-0.1.0/PKG-INFO +209 -0
- faster_table_recognizer-0.1.0/README.md +189 -0
- faster_table_recognizer-0.1.0/examples/service_integration.py +51 -0
- faster_table_recognizer-0.1.0/models/table-transformer-detection/config.json +51 -0
- faster_table_recognizer-0.1.0/models/table-transformer-detection/preprocessor_config.json +18 -0
- faster_table_recognizer-0.1.0/pyproject.toml +31 -0
- faster_table_recognizer-0.1.0/scripts/download_model.sh +18 -0
- faster_table_recognizer-0.1.0/scripts/make_golden.py +66 -0
- faster_table_recognizer-0.1.0/src/download.rs +58 -0
- faster_table_recognizer-0.1.0/src/lib.rs +114 -0
- faster_table_recognizer-0.1.0/src/main.rs +237 -0
- faster_table_recognizer-0.1.0/src/math.rs +625 -0
- faster_table_recognizer-0.1.0/src/model.rs +390 -0
- faster_table_recognizer-0.1.0/src/postprocess.rs +60 -0
- faster_table_recognizer-0.1.0/src/preprocess.rs +184 -0
- faster_table_recognizer-0.1.0/src/python.rs +110 -0
- faster_table_recognizer-0.1.0/src/tensors.rs +105 -0
- faster_table_recognizer-0.1.0/src/winograd.rs +259 -0
- faster_table_recognizer-0.1.0/tests/golden/g_meta.json +24 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_boxes.f32 +0 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_decoder_out.f32 +0 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_encoder_out.f32 +0 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_input_projection.f32 +0 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_logits.f32 +0 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_pixel_values.f32 +4413 -0
- faster_table_recognizer-0.1.0/tests/golden/raw_shapes.json +29 -0
- faster_table_recognizer-0.1.0/tests/golden/table_sample.png +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# No forced target-cpu: published wheels/binaries must run on any x86-64 CPU.
|
|
2
|
+
# The hot kernels (GEMM, Winograd, dot, attention) are hand-written AVX2 and are
|
|
3
|
+
# selected at runtime via `is_x86_feature_detected!`, so they still use AVX2 when
|
|
4
|
+
# available while the binary remains portable.
|
|
5
|
+
#
|
|
6
|
+
# For a machine-specific build with maximum auto-vectorization of the scalar
|
|
7
|
+
# helper loops, build with:
|
|
8
|
+
# RUSTFLAGS="-C target-cpu=native" cargo build --release
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
linux:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Build manylinux x86_64 wheel
|
|
19
|
+
uses: PyO3/maturin-action@v1
|
|
20
|
+
with:
|
|
21
|
+
command: build
|
|
22
|
+
# features come from [tool.maturin] in pyproject.toml (features = ["python"])
|
|
23
|
+
args: --release --out dist
|
|
24
|
+
manylinux: "2014"
|
|
25
|
+
target: x86_64
|
|
26
|
+
- name: Smoke test the wheel
|
|
27
|
+
run: |
|
|
28
|
+
python -m venv /tmp/venv
|
|
29
|
+
/tmp/venv/bin/pip install --upgrade pip
|
|
30
|
+
/tmp/venv/bin/pip install dist/*.whl
|
|
31
|
+
/tmp/venv/bin/python -c "import faster_table_recognizer as f; print('import ok', f.__version__); assert hasattr(f, 'TableRecognizer')"
|
|
32
|
+
- uses: actions/upload-artifact@v4
|
|
33
|
+
with:
|
|
34
|
+
name: wheels-linux
|
|
35
|
+
path: dist
|
|
36
|
+
|
|
37
|
+
sdist:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- name: Build sdist
|
|
42
|
+
uses: PyO3/maturin-action@v1
|
|
43
|
+
with:
|
|
44
|
+
command: sdist
|
|
45
|
+
args: --out dist
|
|
46
|
+
- uses: actions/upload-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: wheels-sdist
|
|
49
|
+
path: dist
|
|
50
|
+
|
|
51
|
+
publish:
|
|
52
|
+
name: Publish to PyPI
|
|
53
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
54
|
+
needs: [linux, sdist]
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/download-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
path: dist
|
|
60
|
+
merge-multiple: true
|
|
61
|
+
- name: Upload to PyPI
|
|
62
|
+
uses: PyO3/maturin-action@v1
|
|
63
|
+
env:
|
|
64
|
+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
|
65
|
+
with:
|
|
66
|
+
command: upload
|
|
67
|
+
args: --non-interactive --skip-existing dist/*
|