wynot12 commented on a change in pull request #203: [NEMO-360] Implementing an 
'XGBoostPolicy'
URL: https://github.com/apache/incubator-nemo/pull/203#discussion_r268674984
 
 

 ##########
 File path: 
compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/NemoOptimizer.java
 ##########
 @@ -113,6 +124,23 @@ public IRDAG optimizeAtRunTime(final IRDAG dag, final 
Message message) {
     return optimizationPolicy.runRunTimeOptimizations(dag, message);
   }
 
+  /**
+   * Operations to be done prior to the Compile-Time Optimizations.
+   * @param dag the DAG to process.
+   * @param policy the optimization policy to optimize the DAG with.
+   */
+  private void beforeCompileTimeOptimization(final IRDAG dag, final Policy 
policy) {
+    if (policy instanceof XGBoostPolicy) {
+      clientRPC.send(ControlMessage.DriverToClientMessage.newBuilder()
+        .setType(ControlMessage.DriverToClientMessageType.LaunchOptimization)
+        .setOptimizationType("xgboost")
+        .setDataCollected(ControlMessage.DataCollectMessage.newBuilder()
+          .setData(dag.irDAGSummary() + this.environmentTypeStr)
+          .build())
+        .build());
+    }
+  }
 
 Review comment:
   I believe that driver should perform this optimization instead of client.
   
   If you choose this way (client-side optimization) due to implementation 
issue(e.g., send a binary/script to driver), please file a jira to change it to 
better design(driver-side optimization) in future.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to