Commit 57cf485e authored by nilsfreyer's avatar nilsfreyer
Browse files

added Error-Stream of the training

parent c8eaeb92
......@@ -186,15 +186,22 @@ public class EMADLGenerator {
ProcessBuilder pb = new ProcessBuilder(Arrays.asList(pythonExe, trainingPath));
Process p = pb.start();
BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedReader bfr1 = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedReader bfr2 = new BufferedReader(new InputStreamReader(p.getErrorStream()));
String line = "";
System.out.println("Starting training of " + trainConfigFilename);
int exitCode = p.waitFor();
System.out.println("Exit Code : " + exitCode);
line = bfr.readLine();
line = bfr1.readLine();
System.out.println("First Line: " + line);
while ((line = bfr.readLine()) != null){
System.out.println("python output:" + line);
while (line != null){
System.out.println(line);
line = bfr1.readLine();
}
line = bfr2.readLine();
while(line != null){
System.out.println(line);
line = bfr2.readLine();
}
}catch(Exception e){System.out.println(e);}
}else{System.out.println("Trainingfile not found.");}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment