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


##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostBasedScheduleGenerator.scala:
##########
@@ -606,8 +610,8 @@ class CostBasedScheduleGenerator(
       .map(level =>
         level
           .map(region => {
-            val (resourceConfig, regionCost) =
-              costEstimator.allocateResourcesAndEstimateCost(region, 1)
+            val (resourceConfig, regionCost) = costEstimatorMemoization
+              .getOrElseUpdate(region, 
costEstimator.allocateResourcesAndEstimateCost(region, 1))

Review Comment:
   We don't, but we do need all the Ids in the region (except regionId) to 
uniquely identify a region so that it contains all the information needed by 
the costEstimator and resourceAllocator to distinguish two regions with 
potentially different outputs of 
`costEstimator.allocateResourcesAndEstimateCost`. I created a separate case 
class for this key.



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