Skip to content

Commit

Permalink
runtime env
Browse files Browse the repository at this point in the history
Signed-off-by: dentiny <[email protected]>
  • Loading branch information
dentiny committed Jan 22, 2025
1 parent 92e6695 commit 4166389
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion release/benchmarks/distributed/test_many_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def test_max_running_tasks(num_tasks):
cpus_per_task = 0.25

@ray.remote(num_cpus=cpus_per_task)
@ray.remote(num_cpus=cpus_per_task, runtime_env={"env_vars": {"FOO": "bar"}})
def task():
time.sleep(sleep_time)

Expand Down
3 changes: 1 addition & 2 deletions src/ray/raylet/worker_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1470,8 +1470,7 @@ void WorkerPool::PrestartWorkers(const TaskSpecification &task_spec,
<< backlog_size << " and available CPUs " << num_available_cpus
<< " num idle workers " << state.idle.size()
<< " num registered workers " << state.registered_workers.size();
PrestartWorkers(language)
PrestartDefaultCpuWorkers(task_spec, num_needed);
PrestartWorkersWithRuntimeEnv(task_spec, num_needed);
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/ray/raylet/worker_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ class WorkerPool : public WorkerPoolInterface, public IOWorkerPoolInterface {
void PrestartDefaultCpuWorkers(ray::Language language, int64_t num_needed);

/// Prestart worker with the given runtime env.
void PrestartWorkers(const TaskSpecification &task_spec, int64_t num_needed);
void PrestartWorkersWithRuntimeEnv(const TaskSpecification &task_spec,
int64_t num_needed);

/// Return the current size of the worker pool for the requested language. Counts only
/// idle workers.
Expand Down

0 comments on commit 4166389

Please sign in to comment.