# Bayes method for searching in sweep

**URL:** <https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261>\
**Category:** W&B Help\
**Created:** [April 23, 2023, 11:30am UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261 "2023-04-23T11:30:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![1060111768](https://avatars.discourse-cdn.com/v4/letter/1/e480ec/32.png) [@1060111768](https://community.wandb.ai/u/1060111768)\
**Post date:** [April 23, 2023, 11:30am UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/1 "2023-04-23T11:30:20Z")

</div>

Hi,  
I am using Bayes searching method to sweep through a group of hyper-parameters. Number of all permutations of these 2 hyper-parameters is 15. I set sweep count as 60, in order to get more cases. However when I check the sweep plots, I see this:

 ![Screenshot from 2023-04-23 13-17-49](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/b/b5d24ccd8cabd322b72c5d1f40a604d4adbdfe21.png)

There are already 44 sweeps, but it seems many of cases are exactly identical. As a result, I actually only get 6 or 7 cases, even less than grid search. As you can see above, many cases are really superpositioned…

So it confuses me now that how should I understand Bayes searching method.  
And there is corresponding code about sweep:

```auto
sweep_configuration = {
'method': 'bayes',
'name': f'{args.dataset_name} 3rd class: levels, hidden_size',
'metric': {'goal': 'minimize', 'name': 'valid/ber'},
'parameters':
{
    'levels': {'values': [1,2,3,4,5]},
    'hidden_size': {'values': [1.0,2.0,3.0]}
}
}
args.tune_count = 60
wandb.agent(sweep_id, function=Hyper_param_Tune, count=args.tune_count)

```

Thanks for any help!

---

<div class="post-metadata">

**Author:** ![1060111768](https://avatars.discourse-cdn.com/v4/letter/1/e480ec/32.png) [@1060111768](https://community.wandb.ai/u/1060111768)\
**Post date:** [April 23, 2023, 11:30am UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/2 "2023-04-23T11:30:57Z")

</div>

Here is also another prove that many cases are identical:

 ![Screenshot from 2023-04-23 13-18-00](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/2X/d/dc775db0aa61e7d11d2051bb303d1a65077a1dd0.jpeg)

---

<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:** [April 26, 2023, 9:17pm UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/3 "2023-04-26T21:17:52Z")

</div>

Hi Jialei, apologies you are running into this, could you send a link to your workspace, as well a the minimal reproduction steps?

---

<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:** [May 2, 2023, 3:13pm UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/4 "2023-05-02T15:13:35Z")

</div>

Hi Jialei,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,  
Weights & Biases

---

<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:** [May 5, 2023, 5:32pm UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/5 "2023-05-05T17:32:03Z")

</div>

Hi Jialei, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

---

<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:** [June 22, 2023, 11:31am UTC](https://community.wandb.ai/t/bayes-method-for-searching-in-sweep/4261/6 "2023-06-22T11:31:33Z")

</div>

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