Closed DE0CH closed 10 months ago
Could you add a test showing how this will work in practice? Will there be some kind of server reading the output of irace and launching commands?
Parallel evaluation seems impossible with this approach: There is nothing that ensures the order of the stuff read from stdin, no?
I'm not sure how targetEvaluator can ever work under this approach, because output <- readLines(file("stdin"), n=1)
implies that runcommand must receive something from targetRunner.
Could you add a test showing how this will work in practice? Will there be some kind of server reading the output of irace and launching commands?
I don't really know how the testing framework works. Could you please tell me where to put the test and what command I need to use to run the test?
Parallel evaluation seems impossible with this approach: There is nothing that ensures the order of the stuff read from stdin, no?
Yeah. There's no easy way to do this. stdin is sequential and the only way to do this is to have the line to contain an ID which irace and then match it with the corresponding run. But I don't really know how to do that in r.
I'm not sure how targetEvaluator can ever work under this approach, because
output <- readLines(file("stdin"), n=1)
implies that runcommand must receive something from targetRunner.
The idea is you have some dispatcher reading stdout and if the line starts with stdout://targetRunner
or stdout://targetEvaluator
, you send it to targetRunner or targetEvaluator, otherwise you treat it as a log and print it somewhere else.
Could you add a test showing how this will work in practice? Will there be some kind of server reading the output of irace and launching commands?
I don't really know how the testing framework works. Could you please tell me where to put the test and what command I need to use to run the test?
You can also see in Makefile
how I run the tests and in https://github.com/MLopez-Ibanez/irace/blob/master/.github/workflows/R-CMD-check.yaml for another way to run them.
I decided to just modify
runcommand
to print to stdout and read from stdin instead of doing anything more complicated. It will just print what it would normally run in the shell to stdout withstdout://targetRunner
andstdout://targetEvaluator
as the first argument to differentiate the two. This has the advantage of benefiting from all the documentation and error checking of the codebase. I don't really have a good way to implement parallelism so I just ask the user to usetargetEvaluator
if they want to know all the runs of a batch and run them in parallel.part of #34