GMUEClab / ecj

ECJ Evolutionary Computation Toolkit
http://cs.gmu.edu/~eclab/projects/ecj/
123 stars 42 forks source link

stderr logging with CommandProblem is broken #67

Closed SigmaX closed 3 years ago

SigmaX commented 3 years ago

When debugging fitness functions that are external processes (i.e. as launched by ec.app.command.CommandProblem, it's helpful to see what the external process wrote to stderr.

Currently this is supposed to be saved to a file named problem_err.txt, but it doesn't seem to be working. I suspect it's not configured to append, so the file gets nuked every generation (though I'm not exactly sure why that prevents me from seeing an error in the most recent generation).

A better approach is probably to just redirect the child process's stderr to ECJ's stderr, so it outputs to the main console.

SigmaX commented 3 years ago

Resolved by https://github.com/GMUEClab/ecj/commit/364afe7303eb858a2855257cc2c2d7a29202b927 . Now redirects to ECJ's stderr, allowing child process exceptions (for example) to be seen when we run ECJ.