mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 11:10:20 +01:00
Workaround the OSError due to bad address failure on the CI runs (#370)
workaround the OSError due to bad address failure on the CI runs
This commit is contained in:
@@ -184,7 +184,7 @@ jobs:
|
|||||||
name: run functional tests
|
name: run functional tests
|
||||||
command: |
|
command: |
|
||||||
export FUNCTIONAL_PRESETS="'not Mujoco and not CARLA and not Doom and not Starcraft'"
|
export FUNCTIONAL_PRESETS="'not Mujoco and not CARLA and not Doom and not Starcraft'"
|
||||||
python3 rl_coach/tests/test_eks.py -c coach-test -bn ${CIRCLE_BUILD_NUM} -tn functional-test -tc "export FUNCTIONAL_PRESETS=${FUNCTIONAL_PRESETS} && make functional_tests_without_docker" -i 316971102342.dkr.ecr.us-west-2.amazonaws.com/coach:$(git describe --tags --always --dirty) -cpu 2048 -mem 4096
|
python3 rl_coach/tests/test_eks.py -c coach-test -bn ${CIRCLE_BUILD_NUM} -tn functional-test -tc "export FUNCTIONAL_PRESETS=${FUNCTIONAL_PRESETS} && make functional_tests_without_docker" -i 316971102342.dkr.ecr.us-west-2.amazonaws.com/coach:$(git describe --tags --always --dirty) -cpu 2048 -mem 8192
|
||||||
no_output_timeout: 45m
|
no_output_timeout: 45m
|
||||||
- run:
|
- run:
|
||||||
name: cleanup
|
name: cleanup
|
||||||
|
|||||||
@@ -50,19 +50,24 @@ def test_preset_args(preset_args, flag, clres, start_time=time.time(),
|
|||||||
run_cmd.extend(test_flag)
|
run_cmd.extend(test_flag)
|
||||||
print(str(run_cmd))
|
print(str(run_cmd))
|
||||||
|
|
||||||
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a_utils.validate_arg_result(flag=test_flag,
|
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
|
||||||
process=proc, start_time=start_time,
|
try:
|
||||||
timeout=time_limit)
|
a_utils.validate_arg_result(flag=test_flag,
|
||||||
except AssertionError:
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
# close process once get assert false
|
process=proc, start_time=start_time,
|
||||||
proc.kill()
|
timeout=time_limit)
|
||||||
# if test failed - print logs
|
except AssertionError:
|
||||||
screen.error(open(clres.stdout.name).read(), crash=False)
|
# close process once get assert false
|
||||||
assert False
|
proc.kill()
|
||||||
|
# if test failed - print logs
|
||||||
|
screen.error(open(clres.stdout.name).read(), crash=False)
|
||||||
|
assert False
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
# if test launch failed due to OSError - skip test
|
||||||
|
pytest.skip(e)
|
||||||
|
|
||||||
proc.kill()
|
proc.kill()
|
||||||
|
|
||||||
@@ -102,20 +107,24 @@ def test_preset_seed(preset_args_for_seed, clres, start_time=time.time(),
|
|||||||
run_cmd.extend(test_flag)
|
run_cmd.extend(test_flag)
|
||||||
print(str(run_cmd))
|
print(str(run_cmd))
|
||||||
|
|
||||||
for _ in range(seed_num):
|
|
||||||
proc.append(subprocess.Popen(run_cmd, stdout=clres.stdout,
|
|
||||||
stderr=clres.stdout))
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a_utils.validate_arg_result(flag=test_flag,
|
for _ in range(seed_num):
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
proc.append(subprocess.Popen(run_cmd, stdout=clres.stdout,
|
||||||
process=proc, start_time=start_time,
|
stderr=clres.stdout))
|
||||||
timeout=time_limit)
|
try:
|
||||||
except AssertionError:
|
a_utils.validate_arg_result(flag=test_flag,
|
||||||
close_processes()
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
# if test failed - print logs
|
process=proc, start_time=start_time,
|
||||||
screen.error(open(clres.stdout.name).read(), crash=False)
|
timeout=time_limit)
|
||||||
assert False
|
except AssertionError:
|
||||||
|
close_processes()
|
||||||
|
# if test failed - print logs
|
||||||
|
screen.error(open(clres.stdout.name).read(), crash=False)
|
||||||
|
assert False
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
# if test launch failed due to OSError - skip test
|
||||||
|
pytest.skip(e)
|
||||||
|
|
||||||
close_processes()
|
close_processes()
|
||||||
|
|
||||||
@@ -145,24 +154,29 @@ def test_preset_n_and_ew(preset_args, clres, start_time=time.time(),
|
|||||||
|
|
||||||
print(str(run_cmd))
|
print(str(run_cmd))
|
||||||
|
|
||||||
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
a_utils.validate_arg_result(flag=test_ew_flag,
|
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
|
||||||
process=proc, start_time=start_time,
|
|
||||||
timeout=time_limit)
|
|
||||||
|
|
||||||
a_utils.validate_arg_result(flag=test_n_flag,
|
try:
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
a_utils.validate_arg_result(flag=test_ew_flag,
|
||||||
process=proc, start_time=start_time,
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
timeout=time_limit)
|
process=proc, start_time=start_time,
|
||||||
except AssertionError:
|
timeout=time_limit)
|
||||||
# close process once get assert false
|
|
||||||
proc.kill()
|
a_utils.validate_arg_result(flag=test_n_flag,
|
||||||
# if test failed - print logs
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
screen.error(open(clres.stdout.name).read(), crash=False)
|
process=proc, start_time=start_time,
|
||||||
assert False
|
timeout=time_limit)
|
||||||
|
except AssertionError:
|
||||||
|
# close process once get assert false
|
||||||
|
proc.kill()
|
||||||
|
# if test failed - print logs
|
||||||
|
screen.error(open(clres.stdout.name).read(), crash=False)
|
||||||
|
assert False
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
# if test launch failed due to OSError - skip test
|
||||||
|
pytest.skip(e)
|
||||||
|
|
||||||
proc.kill()
|
proc.kill()
|
||||||
|
|
||||||
@@ -201,34 +215,39 @@ def test_preset_n_and_ew_and_onnx(preset_args, clres, start_time=time.time(),
|
|||||||
|
|
||||||
print(str(run_cmd))
|
print(str(run_cmd))
|
||||||
|
|
||||||
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Check csv files has been created
|
proc = subprocess.Popen(run_cmd, stdout=clres.stdout, stderr=clres.stdout)
|
||||||
a_utils.validate_arg_result(flag=test_ew_flag,
|
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
|
||||||
process=proc, start_time=start_time,
|
|
||||||
timeout=time_limit)
|
|
||||||
|
|
||||||
# Check csv files created same as the number of the workers
|
try:
|
||||||
a_utils.validate_arg_result(flag=test_n_flag,
|
# Check csv files has been created
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
a_utils.validate_arg_result(flag=test_ew_flag,
|
||||||
process=proc, start_time=start_time,
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
timeout=time_limit)
|
process=proc, start_time=start_time,
|
||||||
|
timeout=time_limit)
|
||||||
|
|
||||||
# Check checkpoint files
|
# Check csv files created same as the number of the workers
|
||||||
a_utils.validate_arg_result(flag=test_s_flag,
|
a_utils.validate_arg_result(flag=test_n_flag,
|
||||||
p_valid_params=p_valid_params, clres=clres,
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
process=proc, start_time=start_time,
|
process=proc, start_time=start_time,
|
||||||
timeout=time_limit)
|
timeout=time_limit)
|
||||||
|
|
||||||
# TODO: add onnx check; issue found #257
|
# Check checkpoint files
|
||||||
|
a_utils.validate_arg_result(flag=test_s_flag,
|
||||||
|
p_valid_params=p_valid_params, clres=clres,
|
||||||
|
process=proc, start_time=start_time,
|
||||||
|
timeout=time_limit)
|
||||||
|
|
||||||
except AssertionError:
|
# TODO: add onnx check; issue found #257
|
||||||
# close process once get assert false
|
|
||||||
proc.kill()
|
except AssertionError:
|
||||||
# if test failed - print logs
|
# close process once get assert false
|
||||||
screen.error(open(clres.stdout.name).read(), crash=False)
|
proc.kill()
|
||||||
assert False
|
# if test failed - print logs
|
||||||
|
screen.error(open(clres.stdout.name).read(), crash=False)
|
||||||
|
assert False
|
||||||
|
|
||||||
|
except OSError as e:
|
||||||
|
# if test launch failed due to OSError - skip test
|
||||||
|
pytest.skip(e)
|
||||||
|
|
||||||
proc.kill()
|
proc.kill()
|
||||||
|
|||||||
Reference in New Issue
Block a user