update to reflect change in offline branch#210
Conversation
| if tile.cupy.is_cupy: | ||
| tile = tile.cupy.as_numpy() | ||
| free_cupy() | ||
| if has_cuda_and_cupy(): |
There was a problem hiding this comment.
This might be problematic and causing the backpressure.
There was a problem hiding this comment.
I was running into this issue
File "/Users/cwang138/Documents/Projects/PDG/darts-nextgen/darts-utils/src/darts_utils/cuda.py", line 67, in move_to_host
if tile.cupy.is_cupy:
^^^^^^^^^
File "/Users/cwang138/Documents/Projects/PDG/darts-nextgen/.venv/lib/python3.12/site-packages/xarray/core/common.py", line 306, in getattr
raise AttributeError(
AttributeError: 'Dataset' object has no attribute 'cupy'. Did you mean: 'copy'?
hence I added different safeguard
Tobias Hölzer
Nov 13th at 4:50 PM
Ah, maybe try to add "import cupy_xarray " in the function before calling tile.cupy...
🆗
1
4:50
https://github.com/xarray-contrib/cupy-xarray
xarray-contrib/cupy-xarray
Interface for using cupy in xarray, providing convenience accessors.
Website
https://cupy-xarray.readthedocs.io/
Stars
85
Added by GitHub
4:51
Seems like ray doesn't import this properly 😅
12/01/2025 update:
This PR now has the Dockerfile to build a special ray python 3.12 image; it's deployed currently on the google k8s engine.
To test:
Details on how to build new images and deployment, you could refer to https://docs.google.com/document/d/1xTs23P5_q-604AvJqK_5ZhSAtSwtPaol3po1tbE0p98/edit?tab=t.0
Right now this will run into GEE error, possibly missing the application credential json in the designated place.
To test:
On local machine, download the model/ geojson / and the needed arcticdem and tcvis then run
My local config