Skip to content

Commit

Permalink
feat: flexible numpy/torch backend and tensor type checking (#69)
Browse files Browse the repository at this point in the history
This PR is a combination of:
* feat: automatic tensor backend and type checks (#64)
* perf: performance improvements for backend function wrappers (#66)
* feat: improved backend, union handling, tensor creation APIs (#68)
  • Loading branch information
yxlao authored Jul 9, 2024
1 parent 6eca218 commit 04beaea
Show file tree
Hide file tree
Showing 8 changed files with 1,141 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run unit tests
- name: Run unit tests (numpy)
run: |
pytest
- name: Install dependencies with torch
run: |
pip install -e .[torch]
- name: Run unit tests (numpy + torch)
run: |
pytest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
camtools/assets/bbox_box.png
camtools/assets/bbox_box_blender.png

# cProfile
*.prof

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
2 changes: 1 addition & 1 deletion camtools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from . import artifact
from . import backend
from . import camera
from . import colmap
from . import colormap
Expand All @@ -16,7 +17,6 @@
from . import transform
from . import util


try:
# Python >= 3.8
from importlib.metadata import version
Expand Down
Loading

0 comments on commit 04beaea

Please sign in to comment.