From 508293fcceafe61ebeea8fb00d134b62f980f47a Mon Sep 17 00:00:00 2001 From: Manuel Gunther <siebenkopf@googlemail.com> Date: Tue, 24 Oct 2017 10:21:48 -0600 Subject: [PATCH] Removed write_commands function in grid_search (closes #71) --- bob/bio/base/script/grid_search.py | 15 --------------- bob/bio/base/test/test_scripts.py | 2 -- 2 files changed, 17 deletions(-) diff --git a/bob/bio/base/script/grid_search.py b/bob/bio/base/script/grid_search.py index e7761fd4..975843f5 100755 --- a/bob/bio/base/script/grid_search.py +++ b/bob/bio/base/script/grid_search.py @@ -90,9 +90,6 @@ def command_line_options(command_line_parameters): parser.add_argument('-G', '--gridtk-database-directory', metavar='DIR', default = 'grid_db', help = 'Directory where the submitted.sql3 files should be written into (will create sub-directories on need)') - parser.add_argument('-w', '--write-commands', - help = '(optional) The file name where to write the calls into (will not write the dependencies, though)') - parser.add_argument('-q', '--dry-run', action='store_true', help = 'Just write the commands to console and mimic dependencies, but do not execute the commands') @@ -301,18 +298,6 @@ def execute_dependent_task(command_line, directories, dependency_level): if args.parameters is not None: command_line += args.parameters[1:] - # write the command to file? - if args.write_commands: - index = command_line.index('--gridtk-database-file') - command_file = os.path.join(os.path.dirname(command_line[index+1]), args.write_commands) - bob.io.base.create_directories_safe(os.path.dirname(command_file)) - with open(command_file, 'w') as f: - f.write('bin/verify.py ') - for p in command_line: - f.write(p + ' ') - f.close() - logger.info("Wrote command line into file '%s'", command_file) - # extract dependencies global job_ids dependencies = [] diff --git a/bob/bio/base/test/test_scripts.py b/bob/bio/base/test/test_scripts.py index 0226f6de..ddb6d936 100644 --- a/bob/bio/base/test/test_scripts.py +++ b/bob/bio/base/test/test_scripts.py @@ -591,7 +591,6 @@ def test_grid_search(): '-G', test_dir, '-T', test_dir, '-R', test_dir, - '-w', 'Job.txt', '-g', 'grid', '-v', '--', '--dry-run', @@ -613,7 +612,6 @@ def test_grid_search(): '-G', test_dir, '-T', test_dir, '-R', test_dir, - '-w', 'Job.txt', '-l', '4', '-L', '-1', '-v', '--', '--imports', 'bob.io.image', '--dry-run', -- GitLab