Skip to content

Non-default argument follows default argument #412

Answered by jgbos
DubiousCactus asked this question in Q&A
Discussion options

You must be logged in to vote

@DubiousCactus ok. I can confirm that there is something weird going on here. The solution is to use hydra_zen.MISSING as None does not work. Here is my working example:

from hydra_zen import zen, store, MISSING, make_config


def launch_experiment(trainer, model):
    print(trainer, model)


store(dict(foo=1), group="trainer", name="default")
store(dict(foo=3), group="trainer", name="mano")

store(dict(bar=2), group="model", name="default")
store(dict(bar=4), group="model", name="megalnp")

Experiment = make_config(
    hydra_defaults=["_self_", {"trainer": "default"}, {"model": "default"}],
    trainer=MISSING,   # normally I would use None, but that does not work with experiment configs

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@rsokl
Comment options

@jgbos
Comment options

@DubiousCactus
Comment options

@jgbos
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@rsokl
Comment options

@DubiousCactus
Comment options

Answer selected by DubiousCactus
Comment options

You must be logged in to vote
1 reply
@DubiousCactus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants