(env, action)
| 1 | import wikienv, wrappers |
| 2 | |
| 3 | def step(env, action): |
| 4 | attempts = 0 |
| 5 | while attempts < 10: |
| 6 | try: |
| 7 | return env.step(action) |
| 8 | except requests.exceptions.Timeout: |
| 9 | attempts += 1 |
| 10 | |
| 11 | class HotPotQAEnv: |
| 12 | def __init__(self, n_tasks=100): |