pingsutw commented on a change in pull request #174: SUBMARINE-202. submarine 
core need to support MXNet
URL: https://github.com/apache/submarine/pull/174#discussion_r377138834
 
 

 ##########
 File path: 
submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
 ##########
 @@ -54,67 +55,22 @@ public static Configuration tonyConfFromClientContext(
             parameters.getFramework().getValue());
     tonyConf.setStrings(TonyConfigurationKeys.APPLICATION_NAME,
             parameters.getParameters().getName());
-    tonyConf.setStrings(
-        TonyConfigurationKeys.getInstancesKey(Constants.WORKER_JOB_NAME),
-            parameters.getOptionValue(CliConstants.N_WORKERS));
-    if (parameters.getOptionValue(CliConstants.N_PS) != null) {
-      tonyConf.setStrings(
-              TonyConfigurationKeys.getInstancesKey(Constants.PS_JOB_NAME),
-              parameters.getOptionValue(CliConstants.N_PS));
-    }
-    // Resources for PS & Worker
-    if (parameters.getOptionValue(CliConstants.PS_RES) != null) {
-      Resource psResource = getResource(parameters, CliConstants.PS_RES);
 
-      tonyConf.setInt(
-          TonyConfigurationKeys.getResourceKey(Constants.PS_JOB_NAME,
-              Constants.VCORES),
-              psResource.getVirtualCores());
-      tonyConf.setLong(
-          TonyConfigurationKeys.getResourceKey(Constants.PS_JOB_NAME,
-              Constants.MEMORY),
-          ResourceUtils.getMemorySize(psResource));
-    }
-    if (parameters.getOptionValue(CliConstants.WORKER_RES) != null) {
-      Resource workerResource = getResource(parameters, 
CliConstants.WORKER_RES);
+    setParametersForWorker(tonyConf, parameters);
+    setParametersForPS(tonyConf, parameters);
+    setParametersForScheduler(tonyConf, parameters);
 
 Review comment:
   We could add a function to check if submarine job uses MXNET.
   If we use MXNET and then we `setParametersForScheduler` for it.  

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to