From 9d888f1332b7dbdfa606138308c6d2dcc377ff41 Mon Sep 17 00:00:00 2001 From: Jeremy Reizenstein Date: Fri, 5 Aug 2022 02:49:42 -0700 Subject: [PATCH] install trainer inside pytorch3d Summary: One way to tidy the installation so we don't install files in site-packages/projects. Fixes https://github.com/facebookresearch/pytorch3d/issues/1279 Reviewed By: shapovalov, davnov134 Differential Revision: D38426772 fbshipit-source-id: ac1a54fbf230adb53904701e1f38bf9567f647ce --- setup.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 48223710..3541bcbc 100755 --- a/setup.py +++ b/setup.py @@ -128,7 +128,7 @@ if os.getenv("PYTORCH3D_NO_NINJA", "0") == "1": else: BuildExtension = torch.utils.cpp_extension.BuildExtension -trainer = "projects.implicitron_trainer" +trainer = "pytorch3d.implicitron_trainer" setup( name="pytorch3d", @@ -138,8 +138,10 @@ setup( description="PyTorch3D is FAIR's library of reusable components " "for deep Learning with 3D data.", packages=find_packages( - exclude=("configs", "tests", "tests.*", "docs.*", "projects.nerf.*") - ), + exclude=("configs", "tests", "tests.*", "docs.*", "projects.*") + ) + + [trainer], + package_dir={trainer: "projects/implicitron_trainer"}, install_requires=["fvcore", "iopath"], extras_require={ "all": ["matplotlib", "tqdm>4.29.0", "imageio", "ipywidgets"],