Skip to content

Commit

Permalink
Fix to experimental timeout code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaweihs committed May 12, 2022
1 parent 18fd558 commit 7f3da10
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions allenact/algorithms/onpolicy_sync/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
except ImportError:
DEBUGGING = False

DEBUG_VST_TIMEOUT: Optional[int] = (lambda x: int(x) if x is not None else x)(
os.getenv("ALLENACT_DEBUG_VST_TIMEOUT", None)
)

TRAIN_MODE_STR = "train"
VALID_MODE_STR = "valid"
TEST_MODE_STR = "test"
Expand Down Expand Up @@ -311,7 +315,7 @@ def vector_tasks(
else None,
mp_ctx=self.mp_ctx,
max_processes=self.max_sampler_processes_per_worker,
read_timeout=None if DEBUGGING else 5 * 60
read_timeout=DEBUG_VST_TIMEOUT if DEBUGGING else 5 * 60,
)
return self._vector_tasks

Expand Down Expand Up @@ -1466,7 +1470,8 @@ def run_pipeline(self):
self.initialize_storage_and_viz(
storage_to_initialize=list(uuid_to_storage.values())
)
num_paused = 0
step = -1
continue

# A more informative error message should already have been thrown in be given in
# `collect_step_across_all_task_samplers` if `num_paused != 0` here but this serves
Expand Down

0 comments on commit 7f3da10

Please sign in to comment.