mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
Allow tests to be run on GPU with remote execution
Summary: Test path special case Reviewed By: bottler Differential Revision: D27566817 fbshipit-source-id: c7b3ac839908c071f1378a37b7013b91ca4e8b18
This commit is contained in:
committed by
Facebook GitHub Bot
parent
dd8343922e
commit
c2e62a5087
@@ -1,5 +1,6 @@
|
||||
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
|
||||
|
||||
import os
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from typing import Callable, Optional, Union
|
||||
@@ -19,8 +20,13 @@ def get_tests_dir() -> Path:
|
||||
def get_pytorch3d_dir() -> Path:
|
||||
"""
|
||||
Returns Path for the root PyTorch3D directory.
|
||||
|
||||
Facebook internal systems need a special case here.
|
||||
"""
|
||||
return get_tests_dir().parent
|
||||
if os.environ.get("INSIDE_RE_WORKER") is not None:
|
||||
return Path(__file__).resolve().parent
|
||||
else:
|
||||
return Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
def load_rgb_image(filename: str, data_dir: Union[str, Path]):
|
||||
|
||||
Reference in New Issue
Block a user