From 9a25a354a5da9eed4c6582612fa85dd0d1190ae9 Mon Sep 17 00:00:00 2001 From: Manuel Gunther <siebenkopf@googlemail.com> Date: Tue, 17 May 2016 10:05:35 -0600 Subject: [PATCH] Added hostname to Experiment.info --- bob/bio/base/tools/command_line.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bob/bio/base/tools/command_line.py b/bob/bio/base/tools/command_line.py index e48fae28..ffad31af 100644 --- a/bob/bio/base/tools/command_line.py +++ b/bob/bio/base/tools/command_line.py @@ -1,6 +1,7 @@ import argparse import os import sys +import socket import bob.core logger = bob.core.log.setup("bob.bio.base") @@ -139,7 +140,7 @@ def command_line_parser(description=__doc__, exclude_resources_from=[]): help = "If given, missing files will not stop the processing; this is helpful if not all files of the database can be processed; missing scores will be NaN.") flag_group.add_argument('-r', '--parallel', type=int, help = 'This flag is a shortcut for running the commands on the local machine with the given amount of parallel threads; equivalent to --grid bob.bio.base.grid.Grid("local", number_of_parallel_threads=X) --run-local-scheduler --stop-on-failure.') - + flag_group.add_argument('-t', '--environment', dest='env', nargs='*', default=[], help='Passes specific environment variables to the job.') return { @@ -341,6 +342,7 @@ def write_info(args, command_line_parameters, executable): f = open(args.info_file, 'w') f.write("Command line:\n") f.write(command_line([executable] + command_line_parameters) + "\n\n") + f.write("Host: %s\n" % socket.gethostname()) f.write("Configuration:\n") f.write("Database:\n%s\n\n" % args.database) f.write("Preprocessor:\n%s\n\n" % args.preprocessor) -- GitLab