Skip to content

Specify a configuration that should not be run with multi run #2496

Answered by Jasha10
pablo2909 asked this question in Q&A
Discussion options

You must be logged in to vote

One or more of the following techniques may suit your use-case:

  • Check at runtime within your @main-decorated function:
    if (cfg.model, cfg.optim) == ("resnet", "rmsprop"): raise RuntimeError(f"Aborting job with invalid config: {cfg.model=}, {cfg.optim=}")
  • Use the Callback API to inspect the config in the on_job_start callback. You can throw an error from the callback to abort the job. (Edit: it turns out that a callback-raised Exception will not cause cause the job to abort; see my comment below)
  • Build a plugin that checks whether one of the prohibited combinations is used. This is a heavy-weight solution and will likely only be worth your time if you need low-level customization over the…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by pablo2909
Comment options

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

@pablo2909
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
2 participants