adamantal commented on a change in pull request #145: SUBMARINE-308. Support 
PyTorch with TonY runtime
URL: https://github.com/apache/submarine/pull/145#discussion_r364861537
 
 

 ##########
 File path: 
submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnJobSubmitter.java
 ##########
 @@ -54,22 +52,18 @@ public void setTonyClient(TonyClient client) {
   @Override
   public ApplicationId submitJob(Parameter parameters)
       throws IOException {
-    if (parameters.getFramework() == Framework.PYTORCH) {
-      // we need to throw an exception, as ParametersHolder's parameters field
-      // could not be casted to TensorFlowRunJobParameters.
-      throw new UnsupportedOperationException(
-          "Support \"–-framework\" option for PyTorch in Tony is coming. " +
-              "Please check the documentation about how to submit a " +
-              "PyTorch job with TonY runtime.");
-    }
-
     LOG.info("Starting Tony runtime..");
 
     File tonyFinalConfPath = File.createTempFile("temp",
         Constants.TONY_FINAL_XML);
     // Write user's overridden conf to an xml to be localized.
-    Configuration tonyConf = YarnUtils.tonyConfFromClientContext(
-        (TensorFlowRunJobParameters) parameters.getParameters());
+    Configuration tonyConf = null;
+    try {
+      tonyConf = YarnUtils.tonyConfFromClientContext(
+          (ParametersHolder) parameters);
+    } catch (Exception e) {
+      throw new RuntimeException("Failed to create tony conf from client 
context", e);
 
 Review comment:
   Maybe throw a `SubmarineException` here? 

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