clearml icon indicating copy to clipboard operation
clearml copied to clipboard

Comparing experiments with Hydra config shows wrong OmegaConf diff

Open antifriz opened this issue 3 years ago • 11 comments
trafficstars

Instead of coloring only the lines that differ, every line after the first diff is colored too.

It seems like diff assumes the same line number too.

It really influences a lot the usability of Hydra for configuring experiments.

antifriz avatar Apr 15 '22 17:04 antifriz

Hi @antifriz,

Thanks for reporting this, we'll take a look - can you provide a short example to replicate?

jkhenning avatar Apr 17 '22 06:04 jkhenning

Hi @antifriz, Please see below, I could not reproduce it. image

Please let us know how to reproduce this, Thanks!

erezalg avatar Apr 24 '22 17:04 erezalg

I have this issue too, for me it comes from experiments where an element is added to the config, like in the example above if you would add another field to the dataset in a new experiment it will color all rows below as changed even though they are all just offset by one line. Is there any workaround to this? Thanks

aweinmann avatar Nov 03 '23 09:11 aweinmann

@aweinmann Which clearml versions (SDK, server...) are you using? Can you share a small example to replicate?

ainoam avatar Nov 05 '23 14:11 ainoam

Hi @ainoam I'm using the following version: Server: 1.12.1-397 SDK: 1.13.1

If i run the hydra example included and then, for example, add a seed field to dataset and run it again the compare will flag all lines below the inserted field as changed and it will look like this:

image

aweinmann avatar Nov 06 '23 08:11 aweinmann

@ainoam any update on this issue?

aweinmann avatar Jan 09 '24 08:01 aweinmann

+1 for this issue. I can reproduce it. It matters a lot if one like me frequently adds/deletes hyperparameters when designing new models.

My current solution is to manually convert the omegaconf object to a nested dictionary:

task.connect_configuration(OmegaConf.to_container(cfg))

Then the difference is shown correctly: image

One drawback is that the nested dict format (with "{}" and "=") has a slightly lower readability, not as compact as the yaml format.

wxdrizzle avatar Feb 03 '24 22:02 wxdrizzle