Skip to content

Commit de0830b

Browse files
committed
fix(ray): guard ray.remote call when opts is None
Guard remote decorator in RayExecutor when opts is None to avoid errors Only create the cache entry if opts is truthy
1 parent bcbded6 commit de0830b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

src/orcapod/core/executors/ray.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def _get_remote_fn(self, ray: Any, fn_name: str) -> Any:
246246
# while we waited for the lock.
247247
if cache_key not in self._remote_fn_cache:
248248
wrapper = make_capture_wrapper(name=fn_name)
249-
self._remote_fn_cache[cache_key] = ray.remote(**opts)(wrapper)
249+
if opts:
250+
self._remote_fn_cache[cache_key] = ray.remote(**opts)(wrapper) if opts else ray.remote(wrapper)
250251
return self._remote_fn_cache[cache_key]
251252

252253
@staticmethod

0 commit comments

Comments
 (0)