facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

Installation issues on MacOS and poetry #1740

Closed GeoffNN closed 8 months ago

GeoffNN commented 8 months ago

šŸ› Bugs / Unexpected behaviors

I'm following the installation instructions on at https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md. The installation errors by saying torch isn't installed, although it is. I'm using Python 3.10.9, and a virtualenv through poetry. I've specific constraints pytorch<2.2 and torchvision=0.16. When installing from github, I get the following error:

On the other hand running poetry run python -c "import torch; print(torch.__version__)" returns "2.1.0".

Instructions To Reproduce the Issue:

Please include the following (depending on what the issue is):

  1. Any changes you made (git diff) or code you wrote N/A

  2. The exact command(s) you ran:

    poetry new test_dir_pytorch3d
    cd test_dir_pytorch3d
    poetry env use 3.10
    poetry add torch=2.1.0 torchvision=0.16
    poetry run python -c "import torch; print(torch.__version__)"
    >>> 2.1.0
    MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++ poetry add  "git+https://github.com/facebookresearch/pytorch3d.git"
    >>> ModuleNotFoundError: No module named 'torch'
  3. What you observed (including the full logs):

    
    Unable to determine package info for path: /Users/.../.venv/src/pytorch3d

Command ['/var/folders/vm/.../.venv/bin/python', '-I', '-W', 'ignore', '-c', "import build\nimport build.env\nimport pyproject_hooks\n\nsource = '/Users/.../.venv/src/pytorch3d'\ndest = '/var/folders/vm/.../dist'\n\nwith build.env.DefaultIsolatedEnv() as env:\n builder = build.ProjectBuilder(\n source_dir=source,\n python_executable=env.python_executable,\n runner=pyproject_hooks.quiet_subprocess_runner,\n )\n env.install(builder.build_system_requires)\n env.install(builder.get_requires_for_build('wheel'))\n builder.metadata_path(dest)\n"] errored with the following return code 1

Error output: Traceback (most recent call last): File "", line 15, in File "/private/var/folders/vm/.../.venv/lib/python3.12/site-packages/build/init.py", line 239, in get_requires_for_build with self._handle_backend(hook_name): File "/opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in exit self.gen.throw(value) File "/private/var/folders/vm/.../.venv/lib/python3.12/site-packages/build/init.py", line 360, in _handle_backend raise BuildBackendException(exception, f'Backend subprocess exited when trying to invoke {hook}') from None build._exceptions.BuildBackendException: Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Fallback egg_info generation failed.

Command ['/var/folders/vm/.../.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1

Output: Traceback (most recent call last): File "/Users/.../.venv/src/pytorch3d/setup.py", line 15, in import torch ModuleNotFoundError: No module named 'torch'



Note that I get the same error when I try `MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++ poetry run pip install "git+https://github.com/facebookresearch/pytorch3d.git"`
GeoffNN commented 8 months ago

Using the -vvv option on poetry add:


(...-py3.10) (base) āžœ  ... git:(main) āœ— MACOSX_DEPLOYMENT_TARGET=10.14 CC=clang CXX=clang++ poetry run poetry add  "git+https://github.com/facebookresearch/pytorch3d.git@stable" -vvv
Loading configuration file /Users/.../Library/Application Support/pypoetry/config.toml
Using virtualenv: /Users/.../.../.venv
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
[urllib3.connectionpool] Starting new HTTPS connection (1): github.com:443
[urllib3.connectionpool] https://github.com:443 "GET /facebookresearch/pytorch3d.git/info/refs?service=git-upload-pack HTTP/1.1" 200 None
Cloning https://github.com/facebookresearch/pytorch3d.git at 'stable' to /Users/.../.../.venv/src/pytorch3d

  Stack trace:

  2  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:350 in _run
      348ā”‚                 output = ""
      349ā”‚             else:
    ā†’ 350ā”‚                 output = subprocess.check_output(
      351ā”‚                     cmd, stderr=stderr, env=env, text=True, **kwargs
      352ā”‚                 )

  1  /opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py:466 in check_output
       464ā”‚         kwargs['input'] = empty
       465ā”‚
    ā†’  466ā”‚     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
       467ā”‚                **kwargs).stdout
       468ā”‚

  CalledProcessError

  Command '['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', '-I', '-W', 'ignore', '-c', "import build\nimport build.env\nimport pyproject_hooks\n\nsource = '/Users/.../.../.venv/src/pytorch3d'\ndest = '/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/dist'\n\nwith build.env.DefaultIsolatedEnv() as env:\n    builder = build.ProjectBuilder(\n        source_dir=source,\n        python_executable=env.python_executable,\n        runner=pyproject_hooks.quiet_subprocess_runner,\n    )\n    env.install(builder.build_system_requires)\n    env.install(builder.get_requires_for_build('wheel'))\n    builder.metadata_path(dest)\n"]' returned non-zero exit status 1.

  at /opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py:571 in run
       567ā”‚             # We don't call process.wait() as .__exit__ does that for us.
       568ā”‚             raise
       569ā”‚         retcode = process.poll()
       570ā”‚         if check and retcode:
    ā†’  571ā”‚             raise CalledProcessError(retcode, process.args,
       572ā”‚                                      output=stdout, stderr=stderr)
       573ā”‚     return CompletedProcess(process.args, retcode, stdout, stderr)
       574ā”‚
       575ā”‚

The following error occurred when trying to handle this error:

  Stack trace:

  4  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/inspection/info.py:589 in get_pep517_metadata
      587ā”‚                 *PEP517_META_BUILD_DEPS,
      588ā”‚             )
    ā†’ 589ā”‚             venv.run_python_script(pep517_meta_build_script)
      590ā”‚             info = PackageInfo.from_metadata(dest_dir)
      591ā”‚         except EnvCommandError as e:

  3  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:325 in run_python_script
      323ā”‚
      324ā”‚     def run_python_script(self, content: str, **kwargs: Any) -> str:
    ā†’ 325ā”‚         return self.run(
      326ā”‚             self._executable,
      327ā”‚             "-I",

  2  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:317 in run
      315ā”‚     def run(self, bin: str, *args: str, **kwargs: Any) -> str:
      316ā”‚         cmd = self.get_command_from_bin(bin) + list(args)
    ā†’ 317ā”‚         return self._run(cmd, **kwargs)
      318ā”‚
      319ā”‚     def run_pip(self, *args: str, **kwargs: Any) -> str:

  1  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/virtual_env.py:99 in _run
       97ā”‚     def _run(self, cmd: list[str], **kwargs: Any) -> str:
       98ā”‚         kwargs["env"] = self.get_temp_environ(environ=kwargs.get("env"))
    ā†’  99ā”‚         return super()._run(cmd, **kwargs)
      100ā”‚
      101ā”‚     def get_temp_environ(

  EnvCommandError

  Command ['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', '-I', '-W', 'ignore', '-c', "import build\nimport build.env\nimport pyproject_hooks\n\nsource = '/Users/.../.../.venv/src/pytorch3d'\ndest = '/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/dist'\n\nwith build.env.DefaultIsolatedEnv() as env:\n    builder = build.ProjectBuilder(\n        source_dir=source,\n        python_executable=env.python_executable,\n        runner=pyproject_hooks.quiet_subprocess_runner,\n    )\n    env.install(builder.build_system_requires)\n    env.install(builder.get_requires_for_build('wheel'))\n    builder.metadata_path(dest)\n"] errored with the following return code 1

  Error output:
  Traceback (most recent call last):
    File "<string>", line 15, in <module>
    File "/private/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/lib/python3.12/site-packages/build/__init__.py", line 239, in get_requires_for_build
      with self._handle_backend(hook_name):
    File "/opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
      self.gen.throw(value)
    File "/private/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/lib/python3.12/site-packages/build/__init__.py", line 360, in _handle_backend
      raise BuildBackendException(exception, f'Backend subprocess exited when trying to invoke {hook}') from None
  build._exceptions.BuildBackendException: Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  at ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:354 in _run
      350ā”‚                 output = subprocess.check_output(
      351ā”‚                     cmd, stderr=stderr, env=env, text=True, **kwargs
      352ā”‚                 )
      353ā”‚         except CalledProcessError as e:
    ā†’ 354ā”‚             raise EnvCommandError(e)
      355ā”‚
      356ā”‚         return output
      357ā”‚
      358ā”‚     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

  Stack trace:

  2  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:350 in _run
      348ā”‚                 output = ""
      349ā”‚             else:
    ā†’ 350ā”‚                 output = subprocess.check_output(
      351ā”‚                     cmd, stderr=stderr, env=env, text=True, **kwargs
      352ā”‚                 )

  1  /opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py:466 in check_output
       464ā”‚         kwargs['input'] = empty
       465ā”‚
    ā†’  466ā”‚     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
       467ā”‚                **kwargs).stdout
       468ā”‚

  CalledProcessError

  Command '['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', 'setup.py', 'egg_info']' returned non-zero exit status 1.

  at /opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py:571 in run
       567ā”‚             # We don't call process.wait() as .__exit__ does that for us.
       568ā”‚             raise
       569ā”‚         retcode = process.poll()
       570ā”‚         if check and retcode:
    ā†’  571ā”‚             raise CalledProcessError(retcode, process.args,
       572ā”‚                                      output=stdout, stderr=stderr)
       573ā”‚     return CompletedProcess(process.args, retcode, stdout, stderr)
       574ā”‚
       575ā”‚

The following error occurred when trying to handle this error:

  Stack trace:

  3  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/inspection/info.py:606 in get_pep517_metadata
      604ā”‚             os.chdir(path)
      605ā”‚             try:
    ā†’ 606ā”‚                 venv.run("python", "setup.py", "egg_info")
      607ā”‚                 info = PackageInfo.from_metadata(path)
      608ā”‚             except EnvCommandError as fbe:

  2  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:317 in run
      315ā”‚     def run(self, bin: str, *args: str, **kwargs: Any) -> str:
      316ā”‚         cmd = self.get_command_from_bin(bin) + list(args)
    ā†’ 317ā”‚         return self._run(cmd, **kwargs)
      318ā”‚
      319ā”‚     def run_pip(self, *args: str, **kwargs: Any) -> str:

  1  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/virtual_env.py:99 in _run
       97ā”‚     def _run(self, cmd: list[str], **kwargs: Any) -> str:
       98ā”‚         kwargs["env"] = self.get_temp_environ(environ=kwargs.get("env"))
    ā†’  99ā”‚         return super()._run(cmd, **kwargs)
      100ā”‚
      101ā”‚     def get_temp_environ(

  EnvCommandError

  Command ['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1

  Output:
  Traceback (most recent call last):
    File "/Users/.../.../.venv/src/pytorch3d/setup.py", line 15, in <module>
      import torch
  ModuleNotFoundError: No module named 'torch'

  at ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/env/base_env.py:354 in _run
      350ā”‚                 output = subprocess.check_output(
      351ā”‚                     cmd, stderr=stderr, env=env, text=True, **kwargs
      352ā”‚                 )
      353ā”‚         except CalledProcessError as e:
    ā†’ 354ā”‚             raise EnvCommandError(e)
      355ā”‚
      356ā”‚         return output
      357ā”‚
      358ā”‚     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

  Stack trace:

  17  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/application.py:327 in run
       325ā”‚
       326ā”‚             try:
     ā†’ 327ā”‚                 exit_code = self._run(io)
       328ā”‚             except BrokenPipeError:
       329ā”‚                 # If we are piped to another process, it may close early and send a

  16  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/console/application.py:190 in _run
       188ā”‚         self._load_plugins(io)
       189ā”‚
     ā†’ 190ā”‚         exit_code: int = super()._run(io)
       191ā”‚         return exit_code
       192ā”‚

  15  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/application.py:431 in _run
       429ā”‚             io.input.interactive(interactive)
       430ā”‚
     ā†’ 431ā”‚         exit_code = self._run_command(command, io)
       432ā”‚         self._running_command = None
       433ā”‚

  14  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/application.py:473 in _run_command
       471ā”‚
       472ā”‚         if error is not None:
     ā†’ 473ā”‚             raise error
       474ā”‚
       475ā”‚         return terminate_event.exit_code

  13  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/application.py:457 in _run_command
       455ā”‚
       456ā”‚             if command_event.command_should_run():
     ā†’ 457ā”‚                 exit_code = command.run(io)
       458ā”‚             else:
       459ā”‚                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  12  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/commands/base_command.py:117 in run
       115ā”‚         io.input.validate()
       116ā”‚
     ā†’ 117ā”‚         return self.execute(io) or 0
       118ā”‚
       119ā”‚     def merge_application_definition(self, merge_args: bool = True) -> None:

  11  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/cleo/commands/command.py:61 in execute
        59ā”‚
        60ā”‚         try:
     ā†’  61ā”‚             return self.handle()
        62ā”‚         except KeyboardInterrupt:
        63ā”‚             return 1

  10  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/console/commands/add.py:160 in handle
       158ā”‚             return 0
       159ā”‚
     ā†’ 160ā”‚         requirements = self._determine_requirements(
       161ā”‚             packages,
       162ā”‚             allow_prereleases=self.option("allow-prereleases"),

   9  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/console/commands/init.py:375 in _determine_requirements
       373ā”‚
       374ā”‚         result = []
     ā†’ 375ā”‚         for requirement in self._parse_requirements(requires):
       376ā”‚             if "git" in requirement or "url" in requirement or "path" in requirement:
       377ā”‚                 result.append(requirement)

   8  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/console/commands/init.py:441 in _parse_requirements
       439ā”‚             cwd=cwd,
       440ā”‚         )
     ā†’ 441ā”‚         return [parser.parse(requirement) for requirement in requirements]
       442ā”‚
       443ā”‚     def _format_requirements(self, requirements: list[dict[str, str]]) -> Requirements:

   7  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/dependency_specification.py:89 in parse
        87ā”‚
        88ā”‚         specification = (
     ā†’  89ā”‚             self._parse_url(requirement)
        90ā”‚             or self._parse_path(requirement)
        91ā”‚             or self._parse_simple(requirement)

   6  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/dependency_specification.py:149 in _parse_url
       147ā”‚
       148ā”‚         if url_parsed.scheme in GIT_URL_SCHEMES:
     ā†’ 149ā”‚             return self._parse_git_url(requirement)
       150ā”‚
       151ā”‚         if url_parsed.scheme in ["http", "https"]:

   5  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/utils/dependency_specification.py:133 in _parse_git_url
       131ā”‚
       132ā”‚         source_root = self._env.path.joinpath("src") if self._env else None
     ā†’ 133ā”‚         package = self._direct_origin.get_package_from_vcs(
       134ā”‚             "git",
       135ā”‚             url=url.url,

   4  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/packages/direct_origin.py:106 in get_package_from_vcs
       104ā”‚             raise ValueError(f"Unsupported VCS dependency {vcs}")
       105ā”‚
     ā†’ 106ā”‚         return _get_package_from_git(
       107ā”‚             url=url,
       108ā”‚             branch=branch,

   3  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/packages/direct_origin.py:46 in _get_package_from_git
        44ā”‚         path = path.joinpath(subdirectory)
        45ā”‚
     ā†’  46ā”‚     package = DirectOrigin.get_package_from_directory(path)
        47ā”‚     package._source_type = "git"
        48ā”‚     package._source_url = url

   2  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/packages/direct_origin.py:75 in get_package_from_directory
        73ā”‚     @classmethod
        74ā”‚     def get_package_from_directory(cls, directory: Path) -> Package:
     ā†’  75ā”‚         return PackageInfo.from_directory(path=directory).to_package(root_dir=directory)
        76ā”‚
        77ā”‚     def get_package_from_url(self, url: str) -> Package:

   1  ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/inspection/info.py:487 in from_directory
       485ā”‚                         info = cls.from_setup_files(path)
       486ā”‚                     else:
     ā†’ 487ā”‚                         info = get_pep517_metadata(path)
       488ā”‚                 except PackageInfoError:
       489ā”‚                     if not info:

  PackageInfoError

  Unable to determine package info for path: /Users/.../.../.venv/src/pytorch3d

  Command ['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', '-I', '-W', 'ignore', '-c', "import build\nimport build.env\nimport pyproject_hooks\n\nsource = '/Users/.../.../.venv/src/pytorch3d'\ndest = '/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/dist'\n\nwith build.env.DefaultIsolatedEnv() as env:\n    builder = build.ProjectBuilder(\n        source_dir=source,\n        python_executable=env.python_executable,\n        runner=pyproject_hooks.quiet_subprocess_runner,\n    )\n    env.install(builder.build_system_requires)\n    env.install(builder.get_requires_for_build('wheel'))\n    builder.metadata_path(dest)\n"] errored with the following return code 1

  Error output:
  Traceback (most recent call last):
    File "<string>", line 15, in <module>
    File "/private/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/lib/python3.12/site-packages/build/__init__.py", line 239, in get_requires_for_build
      with self._handle_backend(hook_name):
    File "/opt/homebrew/Cellar/python@3.12/3.12.1_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 158, in __exit__
      self.gen.throw(value)
    File "/private/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/lib/python3.12/site-packages/build/__init__.py", line 360, in _handle_backend
      raise BuildBackendException(exception, f'Backend subprocess exited when trying to invoke {hook}') from None
  build._exceptions.BuildBackendException: Backend subprocess exited when trying to invoke get_requires_for_build_wheel

  Fallback egg_info generation failed.

  Command ['/var/folders/vm/xdqwyft13jlb8h5dsr8jfl300000gn/T/tmp6i2w_d2m/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1

  Output:
  Traceback (most recent call last):
    File "/Users/.../.../.venv/src/pytorch3d/setup.py", line 15, in <module>
      import torch
  ModuleNotFoundError: No module named 'torch'

  at ~/Library/Application Support/pipx/venvs/poetry/lib/python3.12/site-packages/poetry/inspection/info.py:609 in get_pep517_metadata
      605ā”‚             try:
      606ā”‚                 venv.run("python", "setup.py", "egg_info")
      607ā”‚                 info = PackageInfo.from_metadata(path)
      608ā”‚             except EnvCommandError as fbe:
    ā†’ 609ā”‚                 raise PackageInfoError(
      610ā”‚                     path, e, "Fallback egg_info generation failed.", fbe
      611ā”‚                 )
      612ā”‚             finally:
      613ā”‚                 os.chdir(cwd)
GeoffNN commented 8 months ago

This is likely a duplicate of https://github.com/facebookresearch/pytorch3d/issues/1673 and https://github.com/facebookresearch/pytorch3d/issues/1419, apologies.