1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

tests: fixed nightly (#301)

* tests: fixed nightly

* tests: temp testing functional tests

* tests: temp testing functional tests

* tests: add seed to -cp

* test: last fix
This commit is contained in:
anabwan
2019-05-05 08:28:57 +03:00
committed by GitHub
parent 582921ffe3
commit 740359587d
4 changed files with 15 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ jobs:
- run:
name: run functional tests
command: |
export FUNCTIONAL_PRESETS="'not mujoco and not CARLA and not doom'"
export FUNCTIONAL_PRESETS="'not Mujoco and not CARLA and not Doom'"
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
no_output_timeout: 30m
- run:
@@ -498,6 +498,10 @@ workflows:
type: approval
requires:
- build_base
# Keep this for debugging functional_tests for nightly jobs
# - functional_tests:
# requires:
# - e2e_approval
- build_gym_env:
requires:
- e2e_approval

View File

@@ -120,7 +120,6 @@ def test_restore_checkpoint(preset_args, clres, framework,
entities = a_utils.get_files_from_dir(checkpoint_dir)
assert len(entities) > 0
assert "checkpoint" in entities
assert any(".ckpt." in file for file in entities)
# send CTRL+C to close experiment

View File

@@ -40,6 +40,12 @@ def test_preset_args(preset_args, flag, clres, start_time=time.time(),
# add flags to run command
test_flag = a_utils.add_one_flag_value(flag=flag)
if flag[0] == "-cp":
seed = ['--seed', '42']
seed_flag = a_utils.add_one_flag_value(flag=seed)
run_cmd.extend(seed_flag)
run_cmd.extend(test_flag)
print(str(run_cmd))

View File

@@ -396,7 +396,7 @@ def validate_arg_result(flag, p_valid_params, clres=None, process=None,
time.sleep(1)
# get the first value after heat-up
time.sleep(1)
time.sleep(3)
results.append(csv["Total steps"].values[-1])
assert int(results[-1]) >= Def.Consts.num_hs, \
@@ -494,9 +494,10 @@ def validate_arg_result(flag, p_valid_params, clres=None, process=None,
worker, and check results.
"""
# wait until files created
csv_path = get_csv_path(clres=clres, extra_tries=20)
num_expected_files = int(flag[1])
csv_path = get_csv_path(clres=clres, extra_tries=20,
num_expected_files=num_expected_files)
assert len(csv_path) >= num_expected_files, \
Def.Consts.ASSERT_MSG.format(str(num_expected_files),
str(len(csv_path)))