mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Fix tests for OSS
Summary: New paths. Reviewed By: patricklabatut Differential Revision: D36734929 fbshipit-source-id: c0ce7ee9145ddca07ef3758d31cc3c261b088e7d
This commit is contained in:
parent
5b74a2cc27
commit
5cd70067e2
@ -81,7 +81,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64
|
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64
|
||||||
python3 setup.py build_ext --inplace
|
python3 setup.py build_ext --inplace
|
||||||
- run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests
|
- run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests -t .
|
||||||
- run: python3 setup.py bdist_wheel
|
- run: python3 setup.py bdist_wheel
|
||||||
|
|
||||||
binary_linux_wheel:
|
binary_linux_wheel:
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64
|
export LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64
|
||||||
python3 setup.py build_ext --inplace
|
python3 setup.py build_ext --inplace
|
||||||
- run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests
|
- run: LD_LIBRARY_PATH=$LD_LIBARY_PATH:/usr/local/cuda-11.3/lib64 python -m unittest discover -v -s tests -t .
|
||||||
- run: python3 setup.py bdist_wheel
|
- run: python3 setup.py bdist_wheel
|
||||||
|
|
||||||
binary_linux_wheel:
|
binary_linux_wheel:
|
||||||
|
@ -147,10 +147,10 @@ After any necessary patching, you can go to "x64 Native Tools Command Prompt for
|
|||||||
cd pytorch3d
|
cd pytorch3d
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
```
|
```
|
||||||
After installing, verify whether all unit tests have passed
|
|
||||||
|
After installing, you can run **unit tests**
|
||||||
```
|
```
|
||||||
cd tests
|
python3 -m unittest discover -v -s tests -t .
|
||||||
python3 -m unittest discover -p *.py
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# FAQ
|
# FAQ
|
||||||
|
@ -47,7 +47,7 @@ test:
|
|||||||
- imageio
|
- imageio
|
||||||
commands:
|
commands:
|
||||||
#pytest .
|
#pytest .
|
||||||
python -m unittest discover -v -s tests
|
python -m unittest discover -v -s tests -t .
|
||||||
|
|
||||||
|
|
||||||
about:
|
about:
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# This source code is licensed under the BSD-style license found in the
|
# This source code is licensed under the BSD-style license found in the
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from omegaconf import OmegaConf
|
from omegaconf import OmegaConf
|
||||||
@ -20,8 +21,9 @@ class TestDataSource(unittest.TestCase):
|
|||||||
self.maxDiff = None
|
self.maxDiff = None
|
||||||
|
|
||||||
def test_one(self):
|
def test_one(self):
|
||||||
cfg = get_default_args(ImplicitronDataSource)
|
with unittest.mock.patch.dict(os.environ, {"CO3D_DATASET_ROOT": ""}):
|
||||||
yaml = OmegaConf.to_yaml(cfg, sort_keys=False)
|
cfg = get_default_args(ImplicitronDataSource)
|
||||||
if DEBUG:
|
yaml = OmegaConf.to_yaml(cfg, sort_keys=False)
|
||||||
(DATA_DIR / "data_source.yaml").write_text(yaml)
|
if DEBUG:
|
||||||
self.assertEqual(yaml, (DATA_DIR / "data_source.yaml").read_text())
|
(DATA_DIR / "data_source.yaml").write_text(yaml)
|
||||||
|
self.assertEqual(yaml, (DATA_DIR / "data_source.yaml").read_text())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user