mirror of
https://github.com/gryf/coach.git
synced 2025-12-20 12:57:59 +01:00
extract method all_presets
This commit is contained in:
@@ -178,6 +178,13 @@ def perform_reward_based_tests(args, preset_validation_params, preset_name):
|
|||||||
return test_passed
|
return test_passed
|
||||||
|
|
||||||
|
|
||||||
|
def all_presets():
|
||||||
|
return [
|
||||||
|
f[:-3] for f in os.listdir(os.path.join('rl_coach', 'presets'))
|
||||||
|
if f[-3:] == '.py' and not f == '__init__.py'
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-p', '--preset',
|
parser.add_argument('-p', '--preset',
|
||||||
@@ -206,8 +213,7 @@ def main():
|
|||||||
if args.preset is not None:
|
if args.preset is not None:
|
||||||
presets_lists = [args.preset]
|
presets_lists = [args.preset]
|
||||||
else:
|
else:
|
||||||
presets_lists = [f[:-3] for f in os.listdir(os.path.join('rl_coach', 'presets')) if
|
presets_lists = all_presets()
|
||||||
f[-3:] == '.py' and not f == '__init__.py']
|
|
||||||
|
|
||||||
fail_count = 0
|
fail_count = 0
|
||||||
test_count = 0
|
test_count = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user