Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
aeioulisa committed Nov 25, 2021
1 parent de73283 commit cf4f19f
Showing 1 changed file with 25 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ public void watchExperiment() throws ApiException{

ExecutorService experimentThread = Executors.newFixedThreadPool(2);

try(Watch<MLJob> watchTF = Watch.createWatch(
try (Watch<MLJob> watchTF = Watch.createWatch(
client,
api.listNamespacedCustomObjectCall(
TFJob.CRD_TF_GROUP_V1,
Expand All @@ -575,7 +575,8 @@ public void watchExperiment() throws ApiException{
null,
null
),
new TypeToken<Watch.Response<MLJob>>() {}.getType()
new TypeToken<Watch.Response<MLJob>>() {
}.getType()
)) {
experimentThread.execute(new Runnable() {
@Override
Expand All @@ -596,11 +597,11 @@ public void run() {
}
}
});
} catch (Exception ex){
} catch (Exception ex) {
throw new RuntimeException();
}

try(Watch<MLJob> watchPytorch = Watch.createWatch(
try (Watch<MLJob> watchPytorch = Watch.createWatch(
client,
api.listNamespacedCustomObjectCall(
PyTorchJob.CRD_PYTORCH_GROUP_V1,
Expand All @@ -616,29 +617,30 @@ public void run() {
null,
null
),
new TypeToken<Watch.Response<MLJob>>() {}.getType()
new TypeToken<Watch.Response<MLJob>>() {
}.getType()
)) {
experimentThread.execute(new Runnable() {
@Override
public void run() {
try {
LOG.info("Start watching on PytorchJobs...");

;
for (Watch.Response<MLJob> experiment : watchPytorch) {
LOG.info("{}", experiment.object.getStatus());
}
} finally {
LOG.info("WATCH PytorchJob END");
try {
watchPytorch.close();
} catch (Exception e){
LOG.error("{}", e.getMessage());
}
}
@Override
public void run() {
try {
LOG.info("Start watching on PytorchJobs...");

;
for (Watch.Response<MLJob> experiment : watchPytorch) {
LOG.info("{}", experiment.object.getStatus());
}
} finally {
LOG.info("WATCH PytorchJob END");
try {
watchPytorch.close();
} catch (Exception e) {
LOG.error("{}", e.getMessage());
}
}
}
});
}catch(Exception ex){
} catch (Exception ex) {
throw new RuntimeException();
}
}
Expand Down

0 comments on commit cf4f19f

Please sign in to comment.