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_r364862225
##########
File path:
submarine-server/server-submitter/submitter-yarn/src/main/java/org/apache/submarine/server/submitter/yarn/YarnUtils.java
##########
@@ -42,107 +48,128 @@
private static final Log LOG = LogFactory.getLog(YarnUtils.class);
public static Configuration tonyConfFromClientContext(
- TensorFlowRunJobParameters parameters) {
+ ParametersHolder parameters) throws YarnException, ParseException {
Configuration tonyConf = new Configuration();
// Add tony.xml for configuration.
tonyConf.addResource(Constants.TONY_XML);
- tonyConf.setInt(
+ tonyConf.setStrings(TonyConfigurationKeys.FRAMEWORK_NAME,
+ parameters.getFramework().getValue());
+ tonyConf.setStrings(TonyConfigurationKeys.APPLICATION_NAME,
+ parameters.getParameters().getName());
+ tonyConf.setStrings(
TonyConfigurationKeys.getInstancesKey(Constants.WORKER_JOB_NAME),
- parameters.getNumWorkers());
- tonyConf.setInt(
- TonyConfigurationKeys.getInstancesKey(Constants.PS_JOB_NAME),
- parameters.getNumPS());
+ 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.getPsResource() != null) {
+ if (parameters.getOptionValue(CliConstants.PS_RES) != null) {
+ Resource resource = getResource(parameters, CliConstants.PS_RES);
Review comment:
```suggestion
Resource psResource = getResource(parameters, CliConstants.PS_RES);
```
----------------------------------------------------------------
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]