tigerflow-ml 0.1.0a0__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.
- tigerflow_ml-0.1.0a0/.github/workflows/cd.yml +84 -0
- tigerflow_ml-0.1.0a0/.github/workflows/ci.yml +122 -0
- tigerflow_ml-0.1.0a0/.gitignore +38 -0
- tigerflow_ml-0.1.0a0/.pre-commit-config.yaml +43 -0
- tigerflow_ml-0.1.0a0/.python-version +1 -0
- tigerflow_ml-0.1.0a0/LICENSE +19 -0
- tigerflow_ml-0.1.0a0/PKG-INFO +79 -0
- tigerflow_ml-0.1.0a0/README.md +49 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/css/extra.css +35 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/1820-handwritten-census-form-geauga-oh.jpg +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/2602.15607v1.pdf +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/detect_input.jpg +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/detect_output.jpg +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/logo.png +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/assets/img/statistical-abstract-of-the-united-states.png +0 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/index.md +53 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/tasks/detect.md +231 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/tasks/ocr.md +259 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/tasks/transcribe.md +150 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs/tasks/translate.md +198 -0
- tigerflow_ml-0.1.0a0/docs/mkdocs.yml +66 -0
- tigerflow_ml-0.1.0a0/examples/detect/.gitignore +3 -0
- tigerflow_ml-0.1.0a0/examples/detect/config.yaml +8 -0
- tigerflow_ml-0.1.0a0/examples/detect/config_video.yaml +9 -0
- tigerflow_ml-0.1.0a0/examples/detect/detect.py +4 -0
- tigerflow_ml-0.1.0a0/examples/detect/run.py +101 -0
- tigerflow_ml-0.1.0a0/examples/ocr/.gitignore +3 -0
- tigerflow_ml-0.1.0a0/examples/ocr/config.yaml +8 -0
- tigerflow_ml-0.1.0a0/examples/ocr/ocr.py +4 -0
- tigerflow_ml-0.1.0a0/examples/ocr/run.py +69 -0
- tigerflow_ml-0.1.0a0/examples/transcribe/.gitignore +3 -0
- tigerflow_ml-0.1.0a0/examples/transcribe/config.yaml +10 -0
- tigerflow_ml-0.1.0a0/examples/transcribe/run.py +69 -0
- tigerflow_ml-0.1.0a0/examples/transcribe/transcribe.py +4 -0
- tigerflow_ml-0.1.0a0/examples/translate/.gitignore +3 -0
- tigerflow_ml-0.1.0a0/examples/translate/config.yaml +8 -0
- tigerflow_ml-0.1.0a0/examples/translate/run.py +79 -0
- tigerflow_ml-0.1.0a0/examples/translate/translate.py +4 -0
- tigerflow_ml-0.1.0a0/pyproject.toml +86 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/__init__.py +7 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/audio/__init__.py +1 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/audio/transcribe/__init__.py +3 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/audio/transcribe/_base.py +183 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/audio/transcribe/local.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/audio/transcribe/slurm.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/image/__init__.py +1 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/image/detect/__init__.py +3 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/image/detect/_base.py +229 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/image/detect/local.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/image/detect/slurm.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/params.py +29 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/py.typed +0 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/__init__.py +0 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/ocr/__init__.py +3 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/ocr/_base.py +134 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/ocr/local.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/ocr/slurm.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/translate/__init__.py +3 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/translate/_base.py +274 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/translate/local.py +11 -0
- tigerflow_ml-0.1.0a0/src/tigerflow_ml/text/translate/slurm.py +11 -0
- tigerflow_ml-0.1.0a0/tests/__init__.py +0 -0
- tigerflow_ml-0.1.0a0/tests/test_entry_points.py +26 -0
- tigerflow_ml-0.1.0a0/tests/test_helpers.py +66 -0
- tigerflow_ml-0.1.0a0/tests/test_imports.py +41 -0
- tigerflow_ml-0.1.0a0/tests/test_params.py +47 -0
- tigerflow_ml-0.1.0a0/uv.lock +2165 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
env:
|
|
8
|
+
UV_VERSION: "0.7.15"
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
ci:
|
|
15
|
+
uses: ./.github/workflows/ci.yml
|
|
16
|
+
|
|
17
|
+
publish:
|
|
18
|
+
needs: ci
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment: pypi
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
id-token: write
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Configure Git credentials
|
|
28
|
+
run: |
|
|
29
|
+
git config user.name github-actions[bot]
|
|
30
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
31
|
+
|
|
32
|
+
- name: Install uv and set up Python
|
|
33
|
+
uses: astral-sh/setup-uv@v5
|
|
34
|
+
with:
|
|
35
|
+
version: ${{ env.UV_VERSION }}
|
|
36
|
+
enable-cache: true
|
|
37
|
+
python-version-file: ".python-version"
|
|
38
|
+
|
|
39
|
+
- name: Sync version with tag name
|
|
40
|
+
run: |
|
|
41
|
+
VERSION=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//')
|
|
42
|
+
uv version $VERSION
|
|
43
|
+
git add .
|
|
44
|
+
git commit -m "Update package version" || echo "Package version up to date"
|
|
45
|
+
git push origin HEAD:main
|
|
46
|
+
|
|
47
|
+
- name: Build the package
|
|
48
|
+
run: uv build
|
|
49
|
+
|
|
50
|
+
- name: Publish to PyPI
|
|
51
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
52
|
+
|
|
53
|
+
docs:
|
|
54
|
+
needs: publish
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- name: Configure Git credentials
|
|
60
|
+
run: |
|
|
61
|
+
git config user.name github-actions[bot]
|
|
62
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
63
|
+
|
|
64
|
+
- name: Checkout merge branch
|
|
65
|
+
run: |
|
|
66
|
+
git fetch origin
|
|
67
|
+
git checkout ${{ github.ref_name }}
|
|
68
|
+
|
|
69
|
+
- name: Install uv and set up Python
|
|
70
|
+
uses: astral-sh/setup-uv@v5
|
|
71
|
+
with:
|
|
72
|
+
version: ${{ env.UV_VERSION }}
|
|
73
|
+
enable-cache: true
|
|
74
|
+
python-version-file: ".python-version"
|
|
75
|
+
|
|
76
|
+
- name: Install dependencies
|
|
77
|
+
run: uv sync --locked --group docs
|
|
78
|
+
|
|
79
|
+
- name: Publish docs to gh-pages
|
|
80
|
+
run: |
|
|
81
|
+
cd docs
|
|
82
|
+
MINOR_VERSION=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v\?\([0-9]*\.[0-9]*\).*/\1/')
|
|
83
|
+
uv run mike deploy --push --update-aliases $MINOR_VERSION latest
|
|
84
|
+
uv run mike set-default --push latest
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
workflow_call:
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: CI-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
UV_VERSION: "0.7.15"
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
lint:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Install uv and set up Python
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
version: ${{ env.UV_VERSION }}
|
|
29
|
+
enable-cache: true
|
|
30
|
+
cache-dependency-glob: |
|
|
31
|
+
uv.lock
|
|
32
|
+
pyproject.toml
|
|
33
|
+
python-version-file: ".python-version"
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: uv sync --locked --group lint
|
|
37
|
+
|
|
38
|
+
- name: Run pre-commit
|
|
39
|
+
run: uv run pre-commit run --all-files
|
|
40
|
+
|
|
41
|
+
test:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
strategy:
|
|
44
|
+
matrix:
|
|
45
|
+
python-version:
|
|
46
|
+
- "3.10"
|
|
47
|
+
- "3.11"
|
|
48
|
+
- "3.12"
|
|
49
|
+
- "3.13"
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
|
|
53
|
+
- name: Install uv and set up Python
|
|
54
|
+
uses: astral-sh/setup-uv@v5
|
|
55
|
+
with:
|
|
56
|
+
version: ${{ env.UV_VERSION }}
|
|
57
|
+
enable-cache: true
|
|
58
|
+
cache-dependency-glob: |
|
|
59
|
+
uv.lock
|
|
60
|
+
pyproject.toml
|
|
61
|
+
python-version: ${{ matrix.python-version }}
|
|
62
|
+
|
|
63
|
+
- name: Install dependencies
|
|
64
|
+
run: uv sync --locked --group test
|
|
65
|
+
|
|
66
|
+
- name: Run tests
|
|
67
|
+
run: uv run pytest tests
|
|
68
|
+
|
|
69
|
+
build:
|
|
70
|
+
needs: test
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Install uv and set up Python
|
|
76
|
+
uses: astral-sh/setup-uv@v5
|
|
77
|
+
with:
|
|
78
|
+
version: ${{ env.UV_VERSION }}
|
|
79
|
+
enable-cache: true
|
|
80
|
+
cache-dependency-glob: |
|
|
81
|
+
uv.lock
|
|
82
|
+
pyproject.toml
|
|
83
|
+
python-version-file: ".python-version"
|
|
84
|
+
|
|
85
|
+
- name: Build the package
|
|
86
|
+
run: uv build
|
|
87
|
+
|
|
88
|
+
docs:
|
|
89
|
+
needs: test
|
|
90
|
+
if: github.event_name == 'push'
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
permissions:
|
|
93
|
+
contents: write
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
|
|
97
|
+
- name: Configure Git credentials
|
|
98
|
+
run: |
|
|
99
|
+
git config user.name github-actions[bot]
|
|
100
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
101
|
+
|
|
102
|
+
- name: Install uv and set up Python
|
|
103
|
+
uses: astral-sh/setup-uv@v5
|
|
104
|
+
with:
|
|
105
|
+
version: ${{ env.UV_VERSION }}
|
|
106
|
+
enable-cache: true
|
|
107
|
+
cache-dependency-glob: |
|
|
108
|
+
uv.lock
|
|
109
|
+
pyproject.toml
|
|
110
|
+
python-version-file: ".python-version"
|
|
111
|
+
|
|
112
|
+
- name: Install dependencies
|
|
113
|
+
run: uv sync --locked --group docs
|
|
114
|
+
|
|
115
|
+
- name: Fetch gh-pages branch
|
|
116
|
+
run: git fetch origin gh-pages --depth=1
|
|
117
|
+
|
|
118
|
+
- name: Publish docs to gh-pages
|
|
119
|
+
run: |
|
|
120
|
+
cd docs
|
|
121
|
+
uv run mike deploy --push next
|
|
122
|
+
uv run mike set-default --push next
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
dist/
|
|
5
|
+
build/
|
|
6
|
+
.eggs/
|
|
7
|
+
*.egg
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
|
|
13
|
+
# IDE
|
|
14
|
+
.idea/
|
|
15
|
+
.vscode/
|
|
16
|
+
*.swp
|
|
17
|
+
*.swo
|
|
18
|
+
|
|
19
|
+
# Testing
|
|
20
|
+
.pytest_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# Type checking
|
|
25
|
+
.ty/
|
|
26
|
+
.mypy_cache/
|
|
27
|
+
|
|
28
|
+
# OS
|
|
29
|
+
.DS_Store
|
|
30
|
+
Thumbs.db
|
|
31
|
+
|
|
32
|
+
# mkdocs
|
|
33
|
+
site/
|
|
34
|
+
|
|
35
|
+
# Examples (generated test data)
|
|
36
|
+
examples/*/.cache/
|
|
37
|
+
examples/*/input/
|
|
38
|
+
examples/*/output/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_commit_msg: "chore: update pre-commit hooks"
|
|
3
|
+
autoupdate_schedule: weekly
|
|
4
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
5
|
+
|
|
6
|
+
repos:
|
|
7
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
8
|
+
rev: v6.0.0
|
|
9
|
+
hooks:
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
- id: check-case-conflict
|
|
12
|
+
- id: check-merge-conflict
|
|
13
|
+
- id: check-yaml
|
|
14
|
+
- id: debug-statements
|
|
15
|
+
- id: end-of-file-fixer
|
|
16
|
+
- id: mixed-line-ending
|
|
17
|
+
- id: trailing-whitespace
|
|
18
|
+
- repo: https://github.com/codespell-project/codespell
|
|
19
|
+
rev: v2.4.1
|
|
20
|
+
hooks:
|
|
21
|
+
- id: codespell
|
|
22
|
+
args: [-L, als]
|
|
23
|
+
- repo: https://github.com/pre-commit/pygrep-hooks
|
|
24
|
+
rev: v1.10.0
|
|
25
|
+
hooks:
|
|
26
|
+
- id: python-use-type-annotations
|
|
27
|
+
- id: python-no-log-warn
|
|
28
|
+
- id: python-check-mock-methods
|
|
29
|
+
- id: python-no-eval
|
|
30
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
31
|
+
rev: v0.15.0
|
|
32
|
+
hooks:
|
|
33
|
+
- id: ruff
|
|
34
|
+
args: [--fix]
|
|
35
|
+
- id: ruff-format
|
|
36
|
+
- repo: local
|
|
37
|
+
hooks:
|
|
38
|
+
- id: ty
|
|
39
|
+
name: ty check
|
|
40
|
+
entry: uvx ty check .
|
|
41
|
+
language: system
|
|
42
|
+
pass_filenames: false
|
|
43
|
+
always_run: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.10
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2025-2026 Colin Swaney, Sangyoon Park, The Trustees of Princeton University
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tigerflow-ml
|
|
3
|
+
Version: 0.1.0a0
|
|
4
|
+
Summary: ML task library for TigerFlow
|
|
5
|
+
Project-URL: Repository, https://github.com/princeton-ddss/tigerflow-ml
|
|
6
|
+
Project-URL: Documentation, https://princeton-ddss.github.io/tigerflow-ml/latest
|
|
7
|
+
Author-email: Colin Swaney <colinswaney@princeton.edu>, Sangyoon Park <sp8538@princeton.edu>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
20
|
+
Classifier: Topic :: Text Processing :: Linguistic
|
|
21
|
+
Requires-Python: <3.14,>=3.10
|
|
22
|
+
Requires-Dist: opencv-python-headless
|
|
23
|
+
Requires-Dist: pillow
|
|
24
|
+
Requires-Dist: pymupdf>=1.27.1
|
|
25
|
+
Requires-Dist: sentencepiece
|
|
26
|
+
Requires-Dist: tigerflow>=0.1.0a1
|
|
27
|
+
Requires-Dist: torch>=2.0
|
|
28
|
+
Requires-Dist: transformers>=4.45
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# tigerflow-ml
|
|
32
|
+
|
|
33
|
+
[](https://github.com/princeton-ddss/tigerflow-ml/actions/workflows/ci.yml)
|
|
34
|
+
[](https://pypi.org/project/tigerflow-ml/)
|
|
35
|
+
[](https://princeton-ddss.github.io/tigerflow-ml/)
|
|
36
|
+
|
|
37
|
+
ML tasks for [TigerFlow](https://github.com/princeton-ddss/tigerflow) — private cloud ML APIs on HPC infrastructure.
|
|
38
|
+
|
|
39
|
+
## Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install tigerflow-ml
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Tasks
|
|
46
|
+
|
|
47
|
+
| Task | Description | Entry Point |
|
|
48
|
+
|------------------|-------------------------------------|-----------------------------------|
|
|
49
|
+
| OCR | Extract text from images and PDFs | `ocr` / `ocr-local` |
|
|
50
|
+
| Translation | Translate text documents | `translate` / `translate-local` |
|
|
51
|
+
| Transcription | Transcribe audio to text | `transcribe` / `transcribe-local` |
|
|
52
|
+
| Object Detection | Detect objects in images and videos | `detect` / `detect-local` |
|
|
53
|
+
|
|
54
|
+
Each task provides both a Slurm variant (for HPC) and a Local variant (for development).
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
After installation, tasks are automatically discoverable via:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
tigerflow tasks list
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Run a task directly:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
python -m tigerflow_ml.text.ocr.slurm --help
|
|
68
|
+
python -m tigerflow_ml.text.translate.slurm --help
|
|
69
|
+
python -m tigerflow_ml.audio.transcribe.slurm --help
|
|
70
|
+
python -m tigerflow_ml.image.detect.slurm --help
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
uv sync --group dev
|
|
77
|
+
uv run pre-commit run --all-files
|
|
78
|
+
uv run pytest tests
|
|
79
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# tigerflow-ml
|
|
2
|
+
|
|
3
|
+
[](https://github.com/princeton-ddss/tigerflow-ml/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/tigerflow-ml/)
|
|
5
|
+
[](https://princeton-ddss.github.io/tigerflow-ml/)
|
|
6
|
+
|
|
7
|
+
ML tasks for [TigerFlow](https://github.com/princeton-ddss/tigerflow) — private cloud ML APIs on HPC infrastructure.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install tigerflow-ml
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Tasks
|
|
16
|
+
|
|
17
|
+
| Task | Description | Entry Point |
|
|
18
|
+
|------------------|-------------------------------------|-----------------------------------|
|
|
19
|
+
| OCR | Extract text from images and PDFs | `ocr` / `ocr-local` |
|
|
20
|
+
| Translation | Translate text documents | `translate` / `translate-local` |
|
|
21
|
+
| Transcription | Transcribe audio to text | `transcribe` / `transcribe-local` |
|
|
22
|
+
| Object Detection | Detect objects in images and videos | `detect` / `detect-local` |
|
|
23
|
+
|
|
24
|
+
Each task provides both a Slurm variant (for HPC) and a Local variant (for development).
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
After installation, tasks are automatically discoverable via:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
tigerflow tasks list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Run a task directly:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
python -m tigerflow_ml.text.ocr.slurm --help
|
|
38
|
+
python -m tigerflow_ml.text.translate.slurm --help
|
|
39
|
+
python -m tigerflow_ml.audio.transcribe.slurm --help
|
|
40
|
+
python -m tigerflow_ml.image.detect.slurm --help
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Development
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv sync --group dev
|
|
47
|
+
uv run pre-commit run --all-files
|
|
48
|
+
uv run pytest tests
|
|
49
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Pirata+One&display=swap");
|
|
2
|
+
|
|
3
|
+
.md-header__button.md-logo img, .md-header__button.md-logo svg {
|
|
4
|
+
fill: currentcolor;
|
|
5
|
+
display: block;
|
|
6
|
+
height: 3.0rem;
|
|
7
|
+
width:auto
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[dir=ltr] .md-header__title {
|
|
11
|
+
line-height: 2.5rem;
|
|
12
|
+
margin-left: .0rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.md-header__topic span {
|
|
16
|
+
line-height: 2.75rem;
|
|
17
|
+
font-family: 'Pirata One', sans-serif;
|
|
18
|
+
font-size: 2.0rem;
|
|
19
|
+
font-weight: 300;
|
|
20
|
+
text-transform: uppercase;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media screen and (max-width: 1220px) { /* For smaller screens */
|
|
24
|
+
.md-header__topic span {
|
|
25
|
+
line-height: 2.6rem;
|
|
26
|
+
font-family: 'Pirata One', 'Roboto', sans-serif;
|
|
27
|
+
font-size: 1.3rem;
|
|
28
|
+
font-weight: 300;
|
|
29
|
+
text-transform: uppercase;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.md-main__inner {
|
|
34
|
+
margin-top: 0;
|
|
35
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
hide:
|
|
3
|
+
- navigation
|
|
4
|
+
---
|
|
5
|
+
<style>
|
|
6
|
+
.md-typeset h1,
|
|
7
|
+
.md-content__button {
|
|
8
|
+
/* display: none; */
|
|
9
|
+
margin-bottom: 0;
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img alt="tigerflow-ml-logo" src="assets/img/logo.png" width="350" />
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://www.python.org">
|
|
21
|
+
<img alt="python-shield" src="https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-3776AB.svg?style=flat&logo=python&logoColor=white"/>
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://opensource.org/licenses/MIT">
|
|
24
|
+
<img alt="mit-license" src="https://img.shields.io/badge/License-MIT-yellow.svg"/>
|
|
25
|
+
</a>
|
|
26
|
+
<a href="https://github.com/princeton-ddss/tigerflow-ml/actions/workflows/ci.yml">
|
|
27
|
+
<img alt="ci" src="https://github.com/princeton-ddss/tigerflow-ml/actions/workflows/ci.yml/badge.svg"/>
|
|
28
|
+
</a>
|
|
29
|
+
<a href="https://pypi.org/project/tigerflow-ml/">
|
|
30
|
+
<img alt="pypi" src="https://img.shields.io/pypi/v/tigerflow-ml"/>
|
|
31
|
+
</a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
**TigerFlow ML** is a [TigerFlow](https://github.com/princeton-ddss/tigerflow) task library extension that makes large-scale machine learning inference a breeze. Think of it as your replacement for expensive, opaque private cloud services. TigerFlow supports *batch inference* by running tasks on your organization's existing HPC resources using TigerFlow orchestration to optimize throughput and take advantage of unused compute cycles. Task logic is completely transparent and open source and relies on open-weight models available from the Hugging Face model hub (or bring your own). Tasks can be used on their own or incorporated into larger workflows using TigerFlow's pipeline construction.
|
|
35
|
+
|
|
36
|
+
## Available Tasks
|
|
37
|
+
|
|
38
|
+
- [OCR](tasks/ocr.md) — Extract text from images and PDFs
|
|
39
|
+
- [Translation](tasks/translate.md) — Translate text documents
|
|
40
|
+
- [Transcription](tasks/transcribe.md) — Transcribe audio to text
|
|
41
|
+
- [Object Detection](tasks/detect.md) — Detect objects in images and videos
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
TigerFlow ML requires [TigerFlow](https://github.com/princeton-ddss/tigerflow) to be installed.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install tigerflow tigerflow-ml
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Next Steps
|
|
52
|
+
|
|
53
|
+
Check out the [Task Guide](tasks/ocr.md) for detailed usage, parameters, and examples.
|