Skip to content

Commit 274b6df

Browse files
bottlerfacebook-github-bot
authored andcommitted
update notebooks for 0.7.3
Summary: Allow pytorch2.0 download: ``` sed -i 's/startswith(\\"1.13.\\")/startswith\(\(\\"1.13.\\", \\"2.0.\\"\)\)/' *b ``` Remove lines which download and install CUB: ``` sed -i.bak '/1.10\.0/d' *b rm *.bak ``` Reviewed By: davidsonic Differential Revision: D44343299 fbshipit-source-id: e8399b5dd10068c717178ba9ffb0630bacca3253
1 parent ebdbfde commit 274b6df

12 files changed

+12
-48
lines changed

docs/tutorials/bundle_adjustment.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"except ModuleNotFoundError:\n",
9090
" need_pytorch3d=True\n",
9191
"if need_pytorch3d:\n",
92-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
92+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
9393
" # We try to install PyTorch3D via a released wheel.\n",
9494
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
9595
" version_str=\"\".join([\n",
@@ -101,9 +101,6 @@
101101
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
102102
" else:\n",
103103
" # We try to install PyTorch3D from source.\n",
104-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
105-
" !tar xzf 1.10.0.tar.gz\n",
106-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
107104
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
108105
]
109106
},

docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"except ModuleNotFoundError:\n",
7777
" need_pytorch3d=True\n",
7878
"if need_pytorch3d:\n",
79-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
79+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
8080
" # We try to install PyTorch3D via a released wheel.\n",
8181
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
8282
" version_str=\"\".join([\n",
@@ -88,9 +88,6 @@
8888
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8989
" else:\n",
9090
" # We try to install PyTorch3D from source.\n",
91-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
92-
" !tar xzf 1.10.0.tar.gz\n",
93-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
9491
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
9592
]
9693
},

docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"except ModuleNotFoundError:\n",
5252
" need_pytorch3d=True\n",
5353
"if need_pytorch3d:\n",
54-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
54+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
5555
" # We try to install PyTorch3D via a released wheel.\n",
5656
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
5757
" version_str=\"\".join([\n",
@@ -63,9 +63,6 @@
6363
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6464
" else:\n",
6565
" # We try to install PyTorch3D from source.\n",
66-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
67-
" !tar xzf 1.10.0.tar.gz\n",
68-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
6966
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
7067
]
7168
},

docs/tutorials/deform_source_mesh_to_target_mesh.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"except ModuleNotFoundError:\n",
9191
" need_pytorch3d=True\n",
9292
"if need_pytorch3d:\n",
93-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
93+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
9494
" # We try to install PyTorch3D via a released wheel.\n",
9595
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
9696
" version_str=\"\".join([\n",
@@ -102,9 +102,6 @@
102102
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
103103
" else:\n",
104104
" # We try to install PyTorch3D from source.\n",
105-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
106-
" !tar xzf 1.10.0.tar.gz\n",
107-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
108105
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
109106
]
110107
},

docs/tutorials/fit_simple_neural_radiance_field.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"except ModuleNotFoundError:\n",
5757
" need_pytorch3d=True\n",
5858
"if need_pytorch3d:\n",
59-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
59+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
6060
" # We try to install PyTorch3D via a released wheel.\n",
6161
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
6262
" version_str=\"\".join([\n",
@@ -68,9 +68,6 @@
6868
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6969
" else:\n",
7070
" # We try to install PyTorch3D from source.\n",
71-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
72-
" !tar xzf 1.10.0.tar.gz\n",
73-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
7471
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
7572
]
7673
},

docs/tutorials/fit_textured_mesh.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"except ModuleNotFoundError:\n",
6969
" need_pytorch3d=True\n",
7070
"if need_pytorch3d:\n",
71-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
71+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
7272
" # We try to install PyTorch3D via a released wheel.\n",
7373
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
7474
" version_str=\"\".join([\n",
@@ -80,9 +80,6 @@
8080
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8181
" else:\n",
8282
" # We try to install PyTorch3D from source.\n",
83-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
84-
" !tar xzf 1.10.0.tar.gz\n",
85-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
8683
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
8784
]
8885
},

docs/tutorials/fit_textured_volume.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"except ModuleNotFoundError:\n",
4848
" need_pytorch3d=True\n",
4949
"if need_pytorch3d:\n",
50-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
50+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
5151
" # We try to install PyTorch3D via a released wheel.\n",
5252
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
5353
" version_str=\"\".join([\n",
@@ -59,9 +59,6 @@
5959
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6060
" else:\n",
6161
" # We try to install PyTorch3D from source.\n",
62-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
63-
" !tar xzf 1.10.0.tar.gz\n",
64-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
6562
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
6663
]
6764
},

docs/tutorials/implicitron_config_system.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"except ModuleNotFoundError:\n",
7979
" need_pytorch3d=True\n",
8080
"if need_pytorch3d:\n",
81-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
81+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
8282
" # We try to install PyTorch3D via a released wheel.\n",
8383
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
8484
" version_str=\"\".join([\n",
@@ -90,9 +90,6 @@
9090
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
9191
" else:\n",
9292
" # We try to install PyTorch3D from source.\n",
93-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
94-
" !tar xzf 1.10.0.tar.gz\n",
95-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
9693
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
9794
]
9895
},

docs/tutorials/implicitron_volumes.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"except ModuleNotFoundError:\n",
7373
" need_pytorch3d=True\n",
7474
"if need_pytorch3d:\n",
75-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
75+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
7676
" # We try to install PyTorch3D via a released wheel.\n",
7777
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
7878
" version_str=\"\".join([\n",
@@ -84,9 +84,6 @@
8484
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8585
" else:\n",
8686
" # We try to install PyTorch3D from source.\n",
87-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
88-
" !tar xzf 1.10.0.tar.gz\n",
89-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
9087
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
9188
]
9289
},

docs/tutorials/render_colored_points.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"except ModuleNotFoundError:\n",
5151
" need_pytorch3d=True\n",
5252
"if need_pytorch3d:\n",
53-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
53+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
5454
" # We try to install PyTorch3D via a released wheel.\n",
5555
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
5656
" version_str=\"\".join([\n",
@@ -62,9 +62,6 @@
6262
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
6363
" else:\n",
6464
" # We try to install PyTorch3D from source.\n",
65-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
66-
" !tar xzf 1.10.0.tar.gz\n",
67-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
6865
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
6966
]
7067
},

docs/tutorials/render_densepose.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"except ModuleNotFoundError:\n",
5858
" need_pytorch3d=True\n",
5959
"if need_pytorch3d:\n",
60-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
60+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
6161
" # We try to install PyTorch3D via a released wheel.\n",
6262
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
6363
" version_str=\"\".join([\n",
@@ -69,9 +69,6 @@
6969
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
7070
" else:\n",
7171
" # We try to install PyTorch3D from source.\n",
72-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
73-
" !tar xzf 1.10.0.tar.gz\n",
74-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
7572
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
7673
]
7774
},

docs/tutorials/render_textured_meshes.ipynb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"except ModuleNotFoundError:\n",
7474
" need_pytorch3d=True\n",
7575
"if need_pytorch3d:\n",
76-
" if torch.__version__.startswith(\"1.13.\") and sys.platform.startswith(\"linux\"):\n",
76+
" if torch.__version__.startswith((\"1.13.\", \"2.0.\")) and sys.platform.startswith(\"linux\"):\n",
7777
" # We try to install PyTorch3D via a released wheel.\n",
7878
" pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n",
7979
" version_str=\"\".join([\n",
@@ -85,9 +85,6 @@
8585
" !pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n",
8686
" else:\n",
8787
" # We try to install PyTorch3D from source.\n",
88-
" !curl -LO https://github.com/NVIDIA/cub/archive/1.10.0.tar.gz\n",
89-
" !tar xzf 1.10.0.tar.gz\n",
90-
" os.environ[\"CUB_HOME\"] = os.getcwd() + \"/cub-1.10.0\"\n",
9188
" !pip install 'git+https://github.com/facebookresearch/pytorch3d.git@stable'"
9289
]
9390
},

0 commit comments

Comments
 (0)