Gurobi / gurobi-logtools

Extract and visualize information from Gurobi log files
Apache License 2.0
100 stars 16 forks source link

Parameter defaults update #48

Closed venaturum closed 3 months ago

venaturum commented 3 months ago

Addresses #47

I have just dumped all parameters into the JSON, whose value is not an empty string, including ones that are not useful for gurobi-logtools, such as Tune*.

Perhaps a bit overkill, but from what I can tell it won't hurt, and makes life easier.

venaturum commented 3 months ago

Does generate-defaults.py still work?

God damn it 😂

venaturum commented 3 months ago

What's the rationale behind excluding parameters with inf defaults?

simonbowly commented 3 months ago

What's the rationale behind excluding parameters with inf defaults?

I can't quite recall. At one point I was using comparison with defaults to generate a run name automatically e.g. 1002-Method1-Presolve0-modelname. Maybe having infinite defaults resulted in some odd behaviour there? Feel free to change it

venaturum commented 3 months ago

I'll test it out and see how it goes

venaturum commented 3 months ago

If you're referring to the functionality provided by python -m gurobi_logtools --write-to-dir ... then I think this is ok.

I tested this with two logs, one with TimeLimit=15, and the other with defaults (so TimeLimit=inf). The "Infinity" values are default so they're never picked up as a changed parameter and the resulting log names were:

1102-TimeLimit15-glass4-0.log
1102-glass4-0.log

Is there a chance I've missed something?

Assuming this works ok, I'll modify generate_defaults.py to allow infinite valued parameters then regenerate the new json files with the script.

simonbowly commented 3 months ago

Sounds good, not sure what I was thinking there. Makes sense to have the infinite defaults included as well.