# Conditional sweep config

**URL:** <https://community.wandb.ai/t/conditional-sweep-config/4017>\
**Category:** W&B Help\
**Tags:** sweeps\
**Created:** [March 7, 2023, 1:12pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017 "2023-03-07T13:12:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hogru](https://avatars.discourse-cdn.com/v4/letter/h/eb9ed0/32.png) [@hogru](https://community.wandb.ai/u/hogru)\
**Post date:** [March 7, 2023, 1:12pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017/1 "2023-03-07T13:12:53Z")

</div>

I guess the answer to this is “not supported” when looking at similar requests, but at least… let me add a +1 to the feature request. Simplified, presume I have two approaches to training a model, each with its own sub-approaches. Is there a way to define a sweep config in a way that I can do a search over sub-approaches that depend on the main approach, i.e., how to build something like:

```bash
python3 train.py --approach a --sub_approach a1
python3 train.py --approach a --sub_approach a2
python3 train.py --approach b --sub_approach b1
python3 train.py --approach b --sub_approach b2

```

I could…

- do 2 sweeps for a anb b in that toy example, but I think I cannot combine the results of different sweeps into a single graph, right?
- Or I could check in `train.py` and abort the program for invalid combinations; in this case I think I need to tell wandb to continue with the sweep since there would be a number of “crashes”
- Or use a different hyper param optimizer and integrate into wandb (but would like to avoid that).

Any other options? If different hyper param optimizer, any recommendation because of better/easier integration with wandb? Thanks for your input/ideas.

---

<div class="post-metadata">

**Author:** ![artsiom](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/artsiom/32/1001_2.png) [@artsiom](https://community.wandb.ai/u/artsiom)\
**Post date:** [March 8, 2023, 4:41pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017/2 "2023-03-08T16:41:01Z")

</div>

Hi Stephan!

This is a very popular feature request. I just +1’ed it and raised the priority on it for you. Hopefully, we’ll see this feature asap!

Cheers,  
Artsiom

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [May 6, 2023, 1:13pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017/3 "2023-05-06T13:13:30Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![corey-strausman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/corey-strausman/32/1561_2.png) [@corey-strausman](https://community.wandb.ai/u/corey-strausman)\
**Post date:** [December 14, 2023, 2:19pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017/4 "2023-12-14T14:19:09Z")

</div>



---

<div class="post-metadata">

**Author:** ![xavier\_gonzalez](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@xavier\_gonzalez](https://community.wandb.ai/u/xavier_gonzalez)\
**Post date:** [December 30, 2024, 6:02pm UTC](https://community.wandb.ai/t/conditional-sweep-config/4017/5 "2024-12-30T18:02:00Z")

</div>

Has this feature been added?
