Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the "timeout_wait" parameter to the CLI ("--timeout-wait="). #5812

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ only: issues
# Issue specific configuration
issues:
limitPerRun: 5
daysUntilStale: 28
daysUntilClose: 14
daysUntilStale: 90
daysUntilClose: 30
markComment: >
This issue has been automatically marked as stale because it has not had activity in the
last 28 days. It will be closed in the next 14 days if no further activity occurs.
last 90 days. It will be closed in the next 30 days if no further activity occurs.
Thank you for your contributions.
closeComment: >
This issue has been automatically closed because it has not had activity in the
last 42 days. If this issue is still valid, please ping a maintainer.
last 120 days. If this issue is still valid, please ping a maintainer.
Thank you for your contributions.
exemptLabels:
- request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/setup-node@v2-beta
with:
node-version: '12'
- run: sudo npm install -g markdown-link-check
- run: sudo npm install -g markdown-link-check@3.8.7
- uses: pre-commit/[email protected]
with:
extra_args: --hook-stage manual markdown-link-check --all-files
Expand Down
6 changes: 6 additions & 0 deletions ml-agents/mlagents/trainers/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ def _create_parser() -> argparse.ArgumentParser:
help="Whether to run the Unity executable in no-graphics mode (i.e. without initializing "
"the graphics driver. Use this only if your agents don't use visual observations.",
)
eng_conf.add_argument(
"--timeout-wait",
default=60,
help="Time (in seconds) to wait for connection from environment.",
action=DetectDefault,
)

torch_conf = argparser.add_argument_group(title="Torch Configuration")
torch_conf.add_argument(
Expand Down
3 changes: 3 additions & 0 deletions ml-agents/mlagents/trainers/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def run_training(run_seed: int, options: RunOptions, num_areas: int) -> None:
env_factory = create_environment_factory(
env_settings.env_path,
engine_settings.no_graphics,
engine_settings.timeout_wait,
run_seed,
num_areas,
port,
Expand Down Expand Up @@ -169,6 +170,7 @@ def write_timing_tree(output_dir: str) -> None:
def create_environment_factory(
env_path: Optional[str],
no_graphics: bool,
timeout_wait: int,
seed: int,
num_areas: int,
start_port: Optional[int],
Expand All @@ -186,6 +188,7 @@ def create_unity_environment(
seed=env_seed,
num_areas=num_areas,
no_graphics=no_graphics,
timeout_wait=timeout_wait,
base_port=start_port,
additional_args=env_args,
side_channels=side_channels,
Expand Down
1 change: 1 addition & 0 deletions ml-agents/mlagents/trainers/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ class EngineSettings:
target_frame_rate: int = parser.get_default("target_frame_rate")
capture_frame_rate: int = parser.get_default("capture_frame_rate")
no_graphics: bool = parser.get_default("no_graphics")
timeout_wait: int = parser.get_default("timeout_wait")


@attr.s(auto_attribs=True)
Expand Down