Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch: Add --batch-no-timestamp command line argument #180

Merged
merged 1 commit into from Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 5 additions & 6 deletions flent/batch.py
Expand Up @@ -261,12 +261,11 @@ def run_commands(self, commands, ctype, essential_only=False):
raise

def gen_filename(self, settings, batch, argset, rep):
filename = "batch-%s-%s-%s" % (
settings.BATCH_NAME,
batch['batch_time'],
batch.get('filename_extra', "%s-%s" % (argset, rep))
)
return clean_path(filename)
p = ["batch", settings.BATCH_NAME]
if self.settings.BATCH_TIMESTAMP:
p.append(batch['batch_time'])
p.append(batch.get('filename_extra', "%s-%s" % (argset, rep)))
return clean_path("-".join(p))

def expand_argsets(self, batch, argsets, batch_time, batch_name,
print_status=True, no_shuffle=False):
Expand Down
7 changes: 7 additions & 0 deletions flent/settings.py
Expand Up @@ -278,6 +278,13 @@ def __call__(self, parser, namespace, values, option_string=None):
action="store_false", dest="BATCH_SHUFFLE",
help="Do not randomise the order of test runs within each batch.")

parser.add_argument(
"--batch-no-timestamp",
action="store_false", dest="BATCH_TIMESTAMP",
help="Do not add a timestamp to batch output filenames. This keeps filenames "
"stable, but requires that the filename_extra variable be unique for each "
"test run. Results will be overwritten and a warning emitted if not.")

parser.add_argument(
"--batch-repetitions", action="store", type=int, dest="BATCH_REPS",
metavar="REPETITIONS",
Expand Down