DE0CH / irace-tuning

0 stars 1 forks source link

Return both cost and time (identical values) for runtime scenarios #3

Closed ndangtt closed 1 year ago

ndangtt commented 1 year ago

The user guide of irace stated that:

"The program targetRunner must print a real number, which corresponds to the cost measure of the candidate configuration for the given instance and optionally its execution time (mandatory when maxTime is used and/or when the capping option is enabled)."

So I think we need to return both cost and time in surrogate_target_runner if the scenario is runtime optimisation. https://github.com/DE0CH/irace-tuning/blob/26035b53ce8a23377d83cbba15c4ad0e9b32fddb/tuning-PoC.py#L70

I guess one way to detect this automatically is to pass this information into meta-irace instance list, so instead of:

https://github.com/DE0CH/irace-tuning/blob/26035b53ce8a23377d83cbba15c4ad0e9b32fddb/tuning-PoC.py#L121

we do:

instances = ["./target_algorithms/surrogate/cplex_regions200/pyrfr_model.cplex_regions200.par10.random.bin runtime"]

And then process that information inside target_irace, i.e., if this is a runtime scenario, we make surrogate_target_runner return two identical values, otherwise we return one value.