Xiao-zhen-Liu commented on code in PR #3550:
URL: https://github.com/apache/texera/pull/3550#discussion_r2289612712
##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostBasedScheduleGenerator.scala:
##########
@@ -601,16 +589,31 @@ class CostBasedScheduleGenerator(
}
/**
- * The cost function used by the search. Takes a region plan, generates one
or more (to be done in the future)
- * schedules based on the region plan, and calculates the cost of the
schedule(s) using Cost Estimator. Uses the cost
- * of the best schedule (currently only considers one schedule) as the cost
of the region plan.
+ * Takes a region DAG, generates one or more (to be done in the future)
schedules based on the region DAG, allocates
+ * resources to each region in the region DAG, and calculates the cost of
the schedule(s) using Cost Estimator. Uses
+ * the cost of the best schedule (currently only considers one schedule) as
the cost of the region DAG.
*
* @return A cost determined by the cost estimator.
*/
- private def evaluate(regionPlan: RegionPlan): Double = {
+ private def allocateResourcesAndEvaluateCost(
+ regionDAG: DirectedAcyclicGraph[Region, RegionLink]
Review Comment:
No, regionDAG needs to be updated here so that each region can be updated
with a resourceConfig. Otherwise the search result will not have the resource
information. Previously we update the resources of a region after the search
returns a regionDAG, but now that we do it as the same time as cost evaluation,
we need to pass regionDAG as input so that the regions get updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]