You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by GitBox <gi...@apache.org> on 2020/02/10 15:39:43 UTC

[GitHub] [submarine] pingsutw commented on a change in pull request #174: SUBMARINE-202. submarine core need to support MXNet

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org