Skip to content

Commit ca7ec6a

Browse files
committed
Merge branch 'always-cuda' into torch2
2 parents b8921b9 + 28e73b7 commit ca7ec6a

9 files changed

+182
-294
lines changed

.github/workflows/conda-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
if: steps.cache.outputs.cache-hit != 'true'
5353

5454
- name: Install happypose
55-
run: pip install -e .
55+
run: pip install -e .[multiview]
5656

5757
- name: Download pre-trained models required for tests
5858
run: |

.github/workflows/pip-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: pip install -U pip
3131

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

3535
- name: Download pre-trained models required for tests
3636
run: |

.github/workflows/poetry-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
cache: poetry
3232

3333
- name: Install happypose
34-
run: poetry install --with dev -E cpu -E pypi -E multiview
34+
run: poetry install --with dev -E pypi -E multiview
3535

3636
- name: Download pre-trained models required for tests
3737
run: |

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.4.1
3+
rev: v0.5.2
44
hooks:
55
- id: ruff
66
args:

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,13 @@ git clone --branch dev --recurse-submodules https://github.com/agimus-project/ha
3939
cd happypose
4040
python -m venv .venv
4141
source .venv/bin/activate
42-
pip install .[pypi,cpu] --extra-index-url https://download.pytorch.org/whl/cpu
42+
pip install .[pypi]
4343
```
4444

4545
### Install extras:
4646

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

5250
## Create data directory
5351

environment.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ channels:
77
- defaults
88
dependencies:
99
- pytorch-cuda==12.1
10-
- python=3.9
1110
- pip
12-
- pytorch==2.1
13-
- torchvision==0.16
14-
- mkl==2024.0.0
11+
- pytorch
12+
- torchvision
1513
- geckodriver
1614
- firefox
1715
- opencv

poetry.lock

+170-259
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+4-21
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,20 @@ scipy = "^1.13.0"
5555
seaborn = "^0.12.2"
5656
selenium = "^4.20.0"
5757
simplejson = "^3.19.2"
58-
torch = [
59-
{markers = "extra=='cpu'", optional = true, source = "torch_cpu", version = "2.1"},
60-
{markers = "extra=='gpu'", optional = true, version = "2.1"}
61-
]
62-
torchnet = "^0.0.4"
58+
torch = {optional = true, version = "^2.3"}
59+
torchnet = {optional = true, version = "^0.0.4"}
6360
torchtnt = {optional = true, version = "^0.2.4"}
64-
torchvision = [
65-
{markers = "extra=='cpu'", optional = true, source = "torch_cpu", version = "0.16"},
66-
{markers = "extra=='gpu'", optional = true, version = "0.16"}
67-
]
61+
torchvision = {optional = true, version = "^0.18"}
6862
tqdm = "^4.66.2"
6963
transforms3d = "^0.4.1"
7064
trimesh = "^3.23.5"
7165
webdataset = "^0.2.57"
7266
xarray = "^2024.3.0"
7367

7468
[tool.poetry.extras]
75-
cpu = ["torch", "torchvision"]
7669
evaluation = ["cmeel-teaser-plusplus"]
77-
gpu = ["torch", "torchvision"]
7870
multiview = ["cosypose"]
79-
pypi = ["opencv-contrib-python", "opencv-python", "pin", "torchtnt"]
71+
pypi = ["opencv-contrib-python", "opencv-python", "pin", "torch", "torchnet", "torchtnt", "torchvision"]
8072

8173
[tool.poetry.group.dev]
8274
optional = true
@@ -93,15 +85,6 @@ optional = true
9385
myst-parser = "^2.0.0"
9486
sphinx = "^7.3.7"
9587

96-
[[tool.poetry.source]]
97-
name = "torch_cpu"
98-
priority = "supplemental"
99-
url = "https://download.pytorch.org/whl/cpu"
100-
101-
[[tool.poetry.source]]
102-
name = "PyPI"
103-
priority = "primary"
104-
10588
[tool.poetry.urls]
10689
changelog = "https://github.com/agimus-project/happypose/blob/main/CHANGELOG.md"
10790

tests/test_cosypose_pose_training.py

-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
)
5252

5353
cudnn.benchmark = True
54-
55-
5654
logger = get_logger(__name__)
5755

5856

0 commit comments

Comments
 (0)