From ce8bb4e58e1dc02a6482dda5daafd2e21fea4d16 Mon Sep 17 00:00:00 2001 From: Artur Niederfahrenhorst Date: Sun, 16 Apr 2023 22:44:15 -0700 Subject: [PATCH] fix cartpole lstm string Signed-off-by: Artur Niederfahrenhorst --- rllib/env/tests/test_policy_client_server_setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rllib/env/tests/test_policy_client_server_setup.sh b/rllib/env/tests/test_policy_client_server_setup.sh index 82b230b69f42..9afb4aa4a51d 100755 --- a/rllib/env/tests/test_policy_client_server_setup.sh +++ b/rllib/env/tests/test_policy_client_server_setup.sh @@ -18,17 +18,20 @@ if [ "$2" == "cartpole" ]; then client_script=cartpole_client.py stop_criterion="--stop-reward=150.0" trainer_cls="PPO" + use_lstm="" elif [ "$2" == "cartpole_lstm" ]; then server_script=cartpole_server.py client_script=cartpole_client.py stop_criterion="--stop-reward=150.0" - trainer_cls="IMPALA --use-lstm" + trainer_cls="IMPALA" + use_lstm="--use-lstm" # Unity3D dummy setup. elif [ "$2" == "unity3d" ]; then server_script=unity3d_server.py client_script=unity3d_dummy_client.py stop_criterion="--num-episodes=10" trainer_cls="PPO" + use_lstm="" # CartPole dummy test using 2 simultaneous episodes on the client. # One episode has training_enabled=False (its data should NOT arrive at server). else @@ -36,6 +39,7 @@ else client_script=dummy_client_with_two_episodes.py stop_criterion="--dummy-arg=dummy" # no stop criterion: client script terminates either way trainer_cls="PPO" + use_lstm="" fi port=$3 @@ -56,7 +60,7 @@ fi # Start server with 2 workers (will listen on ports worker_1_port and worker_2_port for client # connections). # Do not attempt to restore from checkpoint; leads to errors on travis. -(python $basedir/$server_script --run="$trainer_cls" --num-workers=2 --no-restore --port=$worker_1_port 2>&1 | grep -v 200) & +(python $basedir/$server_script --run="$trainer_cls" --num-workers=2 $use_lstm --no-restore --port=$worker_1_port 2>&1 | grep -v 200) & server_pid=$! echo "Waiting for server to start ..."