and is there any way to capture hydra from a notebook as a Configuration? you don't use the typical @hydra.main()
but rather call the compose API , and so far in my testing that doesn't capture the OmegaConf in ClearML
Hmm that makes sense to me, any chance you can open a github issue so we do not forget ? (I do not think it should be very complicated to fix)
Which works for my purposes. Not sure if there's a good way to automate it
Interesting, so if we bind to hydra.compose
it should solve the issue (and of course verify we are running on a jupyter notebook)
wdyt?
Hmm and how would you imagine a transparent integration here (the example looks like a lot of boilerplate code...)
Hi @<1532532498972545024:profile|LittleReindeer37>
Does Hydra support notebooks ? If it does, can you point to an exapmle?
right now I'm doing
# clear existing configs in case we're rerunning the notebook
if hydra.core.global_hydra.GlobalHydra().is_initialized():
hydra.core.global_hydra.GlobalHydra.instance().clear()
# initialize Hydra
hydra.initialize(
version_base=None,
config_path=".",
job_name="test_app",
)
# use the compose API since we're running in a notebook instead of __main__
cfg = hydra.compose(
config_name="config",
overrides=[],
)
# report in ClearML Config UI
clearml.binding.hydra_bind.PatchHydra._register_omegaconf(cfg)
Which works for my purposes. Not sure if there's a good way to automate it - I'll just make it part of my team's internal library for setting up ClearML and assigning names to experiments, etc
cool, if I call clearml.binding.hydra_bind.PatchHydra._register_omegaconf(cfg)
directly inside the notebook I can manually cause it to log the Hydra config, it just doesn't seem to autodetect if you're doing a manual call to Hydra Compose