Skip to content

Commit 6a96f94

Browse files
authored
Reproducible environments (#95)
This PR aims to minimize energy needed to get `b3d` running on different machines. See [B3D reproducibility](https://linear.app/chi-fro/project/b3d-reproducibility-2fab178a363f/overview) for context.
1 parent 149b978 commit 6a96f94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+75854
-9083
lines changed

.github/workflows/pdoc.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: docs
2+
3+
# https://linear.app/chi-fro/issue/GEN-443/parallelhoss-config-check
4+
# on:
5+
# pull_request:
6+
# push:
7+
# branches:
8+
# - main
9+
# workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
pages: write
14+
id-token: write
15+
16+
jobs:
17+
build-deploy:
18+
strategy:
19+
matrix:
20+
runner: [ParallelHoss]
21+
runs-on: ${{ matrix.runner }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- id: auth
26+
uses: google-github-actions/auth@v2
27+
with:
28+
credentials_json: "${{ secrets.ARTIFACT_REGISTRY_KEY }}"
29+
30+
- name: Set up Cloud SDK
31+
uses: google-github-actions/setup-gcloud@v2
32+
33+
- name: pixi run docs
34+
run: |
35+
# install pixi
36+
curl -fsSL https://pixi.sh/install.sh | bash
37+
export PATH=/home/runner/.pixi/bin:$PATH
38+
39+
# install pipx and inject gcp backend
40+
pixi global install pipx
41+
pipx install keyring
42+
pipx inject keyring \
43+
keyrings.google-artifactregistry-auth \
44+
--index-url \
45+
https://pypi.org/simple
46+
47+
# build docs
48+
pixi run docs
49+
50+
- name: Prepend timestamp to index.html
51+
run: |
52+
echo "Published at: $(date)<br/>" | cat - ./docs/static/index.html > temp && mv temp ./docs/static/index.html
53+
54+
- name: Create website artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: website
58+
path: ./docs/static
59+
60+
publish:
61+
needs: build-deploy
62+
uses: probcomp/gen-website-private/.github/workflows/publish_private_website.yml@main
63+
with:
64+
artifact: website

.github/workflows/pixi.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: pixi
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
pixi-update:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Authenticate gcloud
16+
id: auth
17+
uses: google-github-actions/auth@v2
18+
with:
19+
credentials_json: "${{ secrets.ARTIFACT_REGISTRY_KEY }}"
20+
21+
- name: Setup gcloud
22+
uses: google-github-actions/setup-gcloud@v2
23+
24+
- name: Run pixi update
25+
run: |
26+
# install pixi
27+
curl -fsSL https://pixi.sh/install.sh | bash
28+
export PATH=/home/runner/.pixi/bin:$PATH
29+
30+
# install pipx and inject gcp backend
31+
pixi global install pipx
32+
pipx install keyring
33+
pipx inject keyring \
34+
keyrings.google-artifactregistry-auth \
35+
--index-url \
36+
https://pypi.org/simple
37+
38+
# ensure all deps across all environments and platforms can solve
39+
pixi install --locked \
40+
-v \
41+
--pypi-keyring-provider \
42+
subprocess
43+
44+
pixi install --locked \
45+
--environment cpu \
46+
-v \
47+
--pypi-keyring-provider \
48+
subprocess
49+
50+
pixi install --locked \
51+
--environment gpu \
52+
-v \
53+
--pypi-keyring-provider \
54+
subprocess

.github/workflows/shfmt.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: shfmt
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
shfmt:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Run the sh-checker
16+
uses: luizm/action-sh-checker@master
17+
env:
18+
SHFMT_OPTS: --write --simplify --indent 2
19+
with:
20+
sh_checker_shellcheck_disable: true

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.png
44
assets/shared_data_bucket/*
55
assets/test_results/*
6+
!assets/test_results/README.md
67
assets/bop/*
78
assets/nuscenes/*
89
assets/ycbineoat/*
@@ -11,10 +12,13 @@ assets/ycbineoat/*
1112
**/**.npz
1213
**/**.log
1314
**/**.json
15+
!torch.json
1416
**/**.npy
1517
**/**.txt
1618
!src/b3d/renderer/**/**.txt
1719
assets/kitti/*
1820
**/**.pth
19-
**/**.obj
20-
**/**.r3d
21+
.pixi/envs/*
22+
.#*
23+
__pycache__/
24+
*.py[cod]

.pixi/config.toml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[pypi-config]
2+
index-url = "https://pypi.org/simple"
3+
extra-index-urls = ["https://[email protected]/probcomp-caliban/probcomp/simple"]
4+
keyring-provider = "subprocess"

.pre-commit-config.yaml

+43-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ci:
2-
skip: [ruff]
2+
skip: [ruff, pixi-update-default, pixi-update-cpu, pixi-update-gpu]
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -19,3 +19,45 @@ repos:
1919

2020
- id: ruff-format
2121
types_or: [ python, pyi ]
22+
23+
- repo: https://github.com/pecigonzalo/pre-commit-shfmt
24+
rev: v2.2.0
25+
hooks:
26+
- id: shell-fmt-go
27+
args:
28+
- --write
29+
- --simplify
30+
- --indent
31+
- "2"
32+
33+
- repo: local
34+
hooks:
35+
- id: pixi-update-default
36+
name: pixi update default
37+
entry: bash -c 'cd $(git rev-parse --show-toplevel) && pixi update && git add pixi.lock'
38+
language: system
39+
files: ^pyproject\.toml$
40+
types: [text]
41+
42+
- id: pixi-update-cpu
43+
name: pixi update cpu
44+
entry: bash -c 'cd $(git rev-parse --show-toplevel) && pixi update -e cpu && git add pixi.lock'
45+
language: system
46+
files: ^pyproject\.toml$
47+
types: [text]
48+
49+
- id: pixi-update-gpu
50+
name: pixi update gpu
51+
entry: bash -c 'cd $(git rev-parse --show-toplevel) && pixi update -e gpu && git add pixi.lock'
52+
language: system
53+
files: ^pyproject\.toml$
54+
types: [text]
55+
56+
- repo: local
57+
hooks:
58+
- id: gcp-sh-test
59+
name: gcp.sh tests
60+
entry: bash -c 'cd $(git rev-parse --show-toplevel) && cd scripts && ./test-gcp.sh'
61+
language: system
62+
files: .*gcp.*\.sh$
63+
types: [executable]

README.md

+8-89

assets/test_results/README.md

docs/static/b3d.html

+4,529
Large diffs are not rendered by default.

docs/static/b3d/bayes3d.html

+288
Large diffs are not rendered by default.

docs/static/b3d/bayes3d/enumerative_proposals.html

+491
Large diffs are not rendered by default.

docs/static/b3d/bayes3d/likelihoods.html

+662
Large diffs are not rendered by default.

docs/static/b3d/bayes3d/mesh_library.html

+806
Large diffs are not rendered by default.

docs/static/b3d/bayes3d/model.html

+1,174
Large diffs are not rendered by default.

docs/static/b3d/bayes3d/scene_graph.html

+316
Large diffs are not rendered by default.

docs/static/b3d/camera.html

+1,704
Large diffs are not rendered by default.

docs/static/b3d/chisight.html

+279
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense.html

+285
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/dense_model.html

+560
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/differentiable_renderer.html

+1,793
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods.html

+289
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/blur_likelihood.html

+686
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/blur_likelihood_cutoff.html

+619
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/blur_likelihood_gaussian.html

+800
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/image_likelihood.html

+272
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/kray_outlier_volume.html

+533
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/krays.html

+616
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/other_likelihoods.html

+2,938
Large diffs are not rendered by default.

docs/static/b3d/chisight/dense/likelihoods/simple_likelihood.html

+433
Large diffs are not rendered by default.

docs/static/b3d/chisight/particle_system.html

+972
Large diffs are not rendered by default.

docs/static/b3d/chisight/patch_tracking.html

+841
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse.html

+281
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/dynamic_gps.html

+1,383
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/dynamic_sfm.html

+272
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/gps_utils.html

+3,028
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/hgps_utils.html

+365
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/sparse_gps_model.html

+1,222
Large diffs are not rendered by default.

docs/static/b3d/chisight/sparse/sparse_model_reality_check.html

+869
Large diffs are not rendered by default.

docs/static/b3d/colors.html

+975
Large diffs are not rendered by default.

docs/static/b3d/io.html

+2,485
Large diffs are not rendered by default.

docs/static/b3d/pose.html

+283
Large diffs are not rendered by default.

docs/static/b3d/pose/core.html

+6,771
Large diffs are not rendered by default.

docs/static/b3d/pose/pose_utils.html

+819
Large diffs are not rendered by default.

docs/static/b3d/renderer.html

+1,640
Large diffs are not rendered by default.

docs/static/b3d/types.html

+8,418
Large diffs are not rendered by default.

docs/static/b3d/utils.html

+7,584
Large diffs are not rendered by default.

docs/static/index.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="refresh" content="0; url=./b3d.html"/>
6+
</head>
7+
</html>

docs/static/search.js

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

0 commit comments

Comments
 (0)