# Allow unlimited failed runs

**URL:** https://community.wandb.ai/t/allow-unlimited-failed-runs/4482
**Category:** W&B Help
**Tags:** sweeps
**Created:** [May 29, 2023, 2:17pm UTC](https://community.wandb.ai/t/allow-unlimited-failed-runs/4482 "2023-05-29T14:17:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![maxgonzo](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@maxgonzo](https://community.wandb.ai/u/maxgonzo)
#### Post date: [May 29, 2023, 2:17pm UTC](https://community.wandb.ai/t/allow-unlimited-failed-runs/4482/1 "2023-05-29T14:17:49Z")

</div>

Hello,

I want to find the best hyperparameters using wandb, however, some combinations of them raises cuda memory error, how could I tell wandb that still runs with new hyperparameter combinations if there are these errors? So I do not need to check that all possible combinations do not raise a memory cuda error. I am afraid that the whole sweep will stop after a specific number of runs has failed.

Could I use some try except or tell wandb to always execute new runs (like “allow unlimited failed runs”) ?

Thanks in advance

---

<div class="post-metadata">

### Author: ![maxgonzo](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@maxgonzo](https://community.wandb.ai/u/maxgonzo)
#### Post date: [May 29, 2023, 3:28pm UTC](https://community.wandb.ai/t/allow-unlimited-failed-runs/4482/2 "2023-05-29T15:28:02Z")

</div>

The solution is WANDB\_AGENT\_MAX\_INITIAL\_FAILURES=1000

Solved 🙂

---

<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: [July 28, 2023, 3:28pm UTC](https://community.wandb.ai/t/allow-unlimited-failed-runs/4482/3 "2023-07-28T15:28:15Z")

</div>

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