Skip to content

Commit 0c3bed5

Browse files
bottlerfacebook-github-bot
authored andcommitted
setup.py for implicitron_trainer
Summary: Enable `pytorch3d_implicitron_runner` executable Reviewed By: shapovalov Differential Revision: D34754902 fbshipit-source-id: 213f3e9183e3f7dd7b4df16ad77d95fbc971d625
1 parent 97894fb commit 0c3bed5

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

projects/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) Meta Platforms, Inc. and affiliates.
2+
# All rights reserved.
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def __init__(self, *args, **kwargs):
129129
else:
130130
BuildExtension = torch.utils.cpp_extension.BuildExtension
131131

132+
trainer = "projects.implicitron_trainer"
132133

133134
setup(
134135
name="pytorch3d",
@@ -138,12 +139,19 @@ def __init__(self, *args, **kwargs):
138139
description="PyTorch3D is FAIR's library of reusable components "
139140
"for deep Learning with 3D data.",
140141
packages=find_packages(
141-
exclude=("configs", "tests", "tests.*", "docs.*", "projects.*")
142+
exclude=("configs", "tests", "tests.*", "docs.*", "projects.nerf.*")
142143
),
143144
install_requires=["fvcore", "iopath"],
144145
extras_require={
145146
"all": ["matplotlib", "tqdm>4.29.0", "imageio", "ipywidgets"],
146147
"dev": ["flake8", "isort", "black==19.3b0"],
148+
"implicitron": ["hydra-core>=1.1", "visdom", "lpips", "matplotlib"],
149+
},
150+
entry_points={
151+
"console_scripts": [
152+
f"pytorch3d_implicitron_runner={trainer}.experiment",
153+
f"pytorch3d_implicitron_visualizer={trainer}.visualize_reconstruction",
154+
]
147155
},
148156
ext_modules=get_extensions(),
149157
cmdclass={"build_ext": BuildExtension},

0 commit comments

Comments
 (0)