Xiao-zhen-Liu commented on code in PR #3550:
URL: https://github.com/apache/texera/pull/3550#discussion_r2286876347


##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala:
##########
@@ -73,14 +85,21 @@ class DefaultCostEstimator(
     case Some(_) =>
   }
 
-  override def estimate(region: Region, resourceUnits: Int): Double = {
-    this.operatorEstimatedTimeOption match {
+  override def allocateResourcesAndEstimateCost(
+      region: Region,
+      resourceUnits: Int
+  ): (Region, Double) = {
+    // Currently the dummy cost from resourceAllocator is discarded.
+    val (newRegion, _) = resourceAllocator.allocate(region)
+    // We use a cost model that does not rely on the resource allocation.
+    // TODO: Once the ResourceAllocator actually calculates a cost, we can use 
its calculated cost.

Review Comment:
   Currently CostEstimator is indeed calculating the cost of a schedule instead 
of just the region plan (under the current assumption about how we generate the 
schedule). In the future if the ResourceAllocator handles the actual cost 
estimation, the current cost estimation logic of the cost estimator will no 
longer be needed. This PR is moving one step closer to that goal by merging the 
two together.



-- 
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]

Reply via email to