Skip to content

Commit

Permalink
Merge branch 'always-cuda' into torch2
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 25, 2024
2 parents b8921b9 + 28e73b7 commit ca7ec6a
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 294 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'

- name: Install happypose
run: pip install -e .
run: pip install -e .[multiview]

- name: Download pre-trained models required for tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pip-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: pip install -U pip

- name: Install happypose
run: pip install ".[cpu,multiview,pypi]" --extra-index-url https://download.pytorch.org/whl/cpu
run: pip install ".[multiview,pypi]"

- name: Download pre-trained models required for tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/poetry-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
cache: poetry

- name: Install happypose
run: poetry install --with dev -E cpu -E pypi -E multiview
run: poetry install --with dev -E pypi -E multiview

- name: Download pre-trained models required for tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.5.2
hooks:
- id: ruff
args:
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ git clone --branch dev --recurse-submodules https://github.com/agimus-project/ha
cd happypose
python -m venv .venv
source .venv/bin/activate
pip install .[pypi,cpu] --extra-index-url https://download.pytorch.org/whl/cpu
pip install .[pypi]
```

### Install extras:

- `cpu`: required to get pytorch CPU from PyPI (don't use this for GPU or with conda)
- `gpu`: required to get pytorch GPU from PyPI (don't use this for CPU or with conda)
- `multiview`: installs cosypose c++ extension
- `pypi`: install pinocchio & opencv from PyPI (don't use this with conda)
- `pypi`: install torch, pinocchio & opencv from PyPI (don't use this with conda)

## Create data directory

Expand Down
6 changes: 2 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ channels:
- defaults
dependencies:
- pytorch-cuda==12.1
- python=3.9
- pip
- pytorch==2.1
- torchvision==0.16
- mkl==2024.0.0
- pytorch
- torchvision
- geckodriver
- firefox
- opencv
Expand Down
429 changes: 170 additions & 259 deletions poetry.lock

Large diffs are not rendered by default.

25 changes: 4 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,28 +55,20 @@ scipy = "^1.13.0"
seaborn = "^0.12.2"
selenium = "^4.20.0"
simplejson = "^3.19.2"
torch = [
{markers = "extra=='cpu'", optional = true, source = "torch_cpu", version = "2.1"},
{markers = "extra=='gpu'", optional = true, version = "2.1"}
]
torchnet = "^0.0.4"
torch = {optional = true, version = "^2.3"}
torchnet = {optional = true, version = "^0.0.4"}
torchtnt = {optional = true, version = "^0.2.4"}
torchvision = [
{markers = "extra=='cpu'", optional = true, source = "torch_cpu", version = "0.16"},
{markers = "extra=='gpu'", optional = true, version = "0.16"}
]
torchvision = {optional = true, version = "^0.18"}
tqdm = "^4.66.2"
transforms3d = "^0.4.1"
trimesh = "^3.23.5"
webdataset = "^0.2.57"
xarray = "^2024.3.0"

[tool.poetry.extras]
cpu = ["torch", "torchvision"]
evaluation = ["cmeel-teaser-plusplus"]
gpu = ["torch", "torchvision"]
multiview = ["cosypose"]
pypi = ["opencv-contrib-python", "opencv-python", "pin", "torchtnt"]
pypi = ["opencv-contrib-python", "opencv-python", "pin", "torch", "torchnet", "torchtnt", "torchvision"]

[tool.poetry.group.dev]
optional = true
Expand All @@ -93,15 +85,6 @@ optional = true
myst-parser = "^2.0.0"
sphinx = "^7.3.7"

[[tool.poetry.source]]
name = "torch_cpu"
priority = "supplemental"
url = "https://download.pytorch.org/whl/cpu"

[[tool.poetry.source]]
name = "PyPI"
priority = "primary"

[tool.poetry.urls]
changelog = "https://github.com/agimus-project/happypose/blob/main/CHANGELOG.md"

Expand Down
2 changes: 0 additions & 2 deletions tests/test_cosypose_pose_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
)

cudnn.benchmark = True


logger = get_logger(__name__)


Expand Down

0 comments on commit ca7ec6a

Please sign in to comment.