Skip to content

Commit

Permalink
vine: lib tasks coffea casa minor fixes (#3779)
Browse files Browse the repository at this point in the history
* vine: use cores as fallback for slots in dask executor

* vine: set environment variables for libraries in dask executor

* fix env var call
  • Loading branch information
btovar committed Apr 24, 2024
1 parent 6b78b3a commit c5c7563
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,21 @@ def _dask_execute(self, dsk, keys):
if self.lib_resources:
if 'cores' in self.lib_resources:
libtask.set_cores(self.lib_resources['cores'])
libtask.set_function_slots(self.lib_resources['cores']) # use cores as fallback for slots
if 'memory' in self.lib_resources:
libtask.set_memory(self.lib_resources['memory'])
if 'disk' in self.lib_resources:
libtask.set_disk(self.lib_resources['disk'])
if 'slots' in self.lib_resources:
libtask.set_function_slots(self.lib_resources['slots'])
if self.env_vars:
for k, v in self.env_vars.items():
if callable(v):
s = v(self, libtask)
else:
s = v
libtask.set_env_var(k, s)

self.install_library(libtask)

enqueued_calls = []
Expand Down

0 comments on commit c5c7563

Please sign in to comment.