taegeonum commented on a change in pull request #203: [NEMO-360] Implementing
an 'XGBoostPolicy'
URL: https://github.com/apache/incubator-nemo/pull/203#discussion_r267573068
##########
File path:
compiler/optimizer/src/main/java/org/apache/nemo/compiler/optimizer/NemoOptimizer.java
##########
@@ -113,6 +123,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.getClass().getName().contains("XGBoost")) {
Review comment:
Can't we use `instanceof` method? encoding strings in the code is not good
because we should manually change the name whenever we modify the class name or
change the class.
----------------------------------------------------------------
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