Skip to content

Commit

Permalink
[UX] Show 0.25 on controller queue (#4230)
Browse files Browse the repository at this point in the history
* Show 0.25 on controller queue

* format
  • Loading branch information
Michaelvll authored Oct 31, 2024
1 parent 599e155 commit e8d0130
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2498,10 +2498,12 @@ def get_task_resources_str(task: 'task_lib.Task',
the accelerator demands (if any). Otherwise, the CPU demand is shown.
"""
spot_str = ''
is_controller_task = task.is_controller_task()
task_cpu_demand = (str(constants.CONTROLLER_PROCESS_CPU_DEMAND)
if task.is_controller_task() else
str(DEFAULT_TASK_CPU_DEMAND))
if task.best_resources is not None:
if is_controller_task else str(DEFAULT_TASK_CPU_DEMAND))
if is_controller_task:
resources_str = f'CPU:{task_cpu_demand}'
elif task.best_resources is not None:
accelerator_dict = task.best_resources.accelerators
if is_managed_job:
if task.best_resources.use_spot:
Expand Down

0 comments on commit e8d0130

Please sign in to comment.