Skip to content

Commit

Permalink
A method to generate the default resource plan
Browse files Browse the repository at this point in the history
  • Loading branch information
workingloong committed Aug 1, 2023
1 parent b635da7 commit 5431e3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dlrover/python/master/resource/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _init_job_resource_by_optimizer(self):
plan = self._resource_optimizer.generate_opt_plan(self._job_stage)
if not plan or plan.empty():
logger.info("Use the default plan to start the job")
plan = ResourcePlan.new_default_plan()
plan = self._gen_default_resource_plan()
self._job_stage = JobOptStage.WORKER_INITIAL

if (
Expand Down Expand Up @@ -260,6 +260,10 @@ def _init_job_resource_by_optimizer(self):
ps_resource.node_resource.memory,
)

def _gen_default_resource_plan(self):
plan = ResourcePlan.new_default_plan()
return plan

def init_job_resource(self, job_resource: JobResource):
"""Adjust the initial resource of typed pods by EasyDL.
Args:
Expand Down

0 comments on commit 5431e3e

Please sign in to comment.