Integration tests fail on macOS
See original GitHub issueThe parallel dataloader tests still fail on macOS:
$ pytest -m slow
...
self = <tests.samplers.test_single.TestGridGeoSampler object at 0x13524a160>, sampler = <torchgeo.samplers.GridGeoSampler object at 0x13524a2e0>, num_workers = 2
@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: GridGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
dl = DataLoader(
ds, sampler=sampler, num_workers=num_workers, collate_fn=stack_samples
)
> for _ in dl:
tests/samplers/test_single.py:155:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.spack/.spack-env/view/lib/python3.8/site-packages/torch/utils/data/dataloader.py:359: in __iter__
return self._get_iterator()
../.spack/.spack-env/view/lib/python3.8/site-packages/torch/utils/data/dataloader.py:305: in _get_iterator
return _MultiProcessingDataLoaderIter(self)
../.spack/.spack-env/view/lib/python3.8/site-packages/torch/utils/data/dataloader.py:918: in __init__
w.start()
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/context.py:224: in _Popen
return _default_context.get_context().Process._Popen(process_obj)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/context.py:284: in _Popen
return Popen(process_obj)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/popen_spawn_posix.py:32: in __init__
super().__init__(process_obj)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/popen_fork.py:19: in __init__
self._launch(process_obj)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/popen_spawn_posix.py:47: in _launch
reduction.dump(process_obj, fp)
../.spack/.spack-env/._view/upu5ollpmvlcwd5wntc5ajlk2y3qkjpg/lib/python3.8/multiprocessing/reduction.py:60: in dump
ForkingPickler(file, protocol).dump(obj)
torchgeo/datasets/geo.py:193: in __getstate__
objects = self.index.intersection(self.index.bounds, objects=True)
../.spack/.spack-env/view/lib/python3.8/site-packages/rtree/index.py:680: in intersection
return self._intersection_obj(coordinates, objects)
../.spack/.spack-env/view/lib/python3.8/site-packages/rtree/index.py:722: in _intersection_obj
p_mins, p_maxs = self.get_coordinate_pointers(coordinates)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = rtree.index.Index(bounds=[1.7976931348623157e+308, -1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308], size=0)
coordinates = [1.7976931348623157e+308, 1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308, -1.7976931348623157e+308, -1.7976931348623157e+308]
def get_coordinate_pointers(self, coordinates):
try:
iter(coordinates)
except TypeError:
raise TypeError('Bounds must be a sequence')
dimension = self.properties.dimension
mins = ctypes.c_double * dimension
maxs = ctypes.c_double * dimension
if not self.interleaved:
coordinates = Index.interleave(coordinates)
# it's a point make it into a bbox. [x, y] => [x, y, x, y]
if len(coordinates) == dimension:
coordinates += coordinates
if len(coordinates) != dimension * 2:
raise core.RTreeError(
"Coordinates must be in the form "
"(minx, miny, maxx, maxy) or (x, y) for 2D indexes")
# so here all coords are in the form:
# [xmin, ymin, zmin, xmax, ymax, zmax]
for i in range(dimension):
if not coordinates[i] <= coordinates[i + dimension]:
> raise core.RTreeError(
"Coordinates must not have minimums more than maximums")
E rtree.exceptions.RTreeError: Coordinates must not have minimums more than maximums
../.spack/.spack-env/view/lib/python3.8/site-packages/rtree/index.py:357: RTreeError
This bug was supposed to be fixed by #304, but this appears to be a new manifestation of #184. Also see https://github.com/Toblerity/rtree/issues/87 for details.
We should:
- Fix this bug
- Test macOS and Windows on the release branch
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Mac Catalyst unit test fail to run | Apple Developer Forums
This is a known issue in Xcode Cloud. The current workaround is to set the "Enabled Hardened Runtime" build setting to "NO" for...
Read more >Java tests failing when running through Maven on MacOS ...
This started happening after upgrading to MacOS Monterey. The tests run fine through IntelliJ. One thing the tests have in common is, that...
Read more >Retrying Failed Tests With Xcode 13 and Continuous Integration
Retrying Failed Tests through Xcode Test Plans ... We'll be focusing here first on the Test Repetition Mode setting. Set to None by...
Read more >macOS Big Sur upgrade issue - Provar
Salesforce CPQEasily create tests with Test Builder and keep the pricing, product and proposal process error free. Salesforce Industries (Vlocity)Provar's ...
Read more >Run tests | IntelliJ IDEA Documentation - JetBrains
The test that has failed will be rerun in the debug mode. After that, the test will be suspended, allowing you to examine...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually you’re right, the size is 0. Doing
print(intersection_dataset.index)
givesrtree.index.Index(bounds=[1.7976931348623157e+308, -1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308], size=0)
. Let me double check what’s wrong with my dataset, sorry for the false alarm!What’s the length of this dataset? Those specific values tend to mean that the dataset is empty (i.e. there is no intersection between those datasets).