mirror of
https://github.com/gryf/coach.git
synced 2026-02-01 13:25:45 +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:
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user