Commit 0fdfb158 authored by David Trudgian's avatar David Trudgian
Browse files

Allow user-specified working directory in YAML

parent 0b0901c7
......@@ -113,6 +113,10 @@ used as a starting point for your own parameter files
command: train_ann --input train.set --crossk 10
# An optional workind directory. param_runner will cd to this directory
# before beginning to run commands.
# work_dir: /tmp/param_work_test
# If summary entries are defined here we will look at the standard
# output each time the command is run, and try to extract result values
# using regular expressions that are provided. Each summary entry has
......
......@@ -24,6 +24,12 @@ class BaseExecutor:
self.commands = commands
self.params = params
if 'work_dir' in params.vals:
logger.info("Changed to work directory: %s" % params.vals['work_dir'])
os.chdir(params.vals['work_dir'])
cwd = params.vals['work_dir']
logdir = os.path.join(cwd,
"param_runner_%s" % datetime.datetime.now().strftime(
'%Y%m%d-%H%M%s'))
......
......@@ -14,6 +14,12 @@
"description":"Command to execute, including parameters that will not change in the experiment.",
"name":"command"
},
"work_dir":{
"type":"string",
"title":"Working directory",
"description":"An optional workind directory. param_runner will cd to this directory before beginning to run commands.",
"name":"work_dir"
},
"partition":{
"type":"string",
"minLength":1,
......
......@@ -3,13 +3,18 @@
# the runner.
command: echo train_ann --input train.set --crossk 10 TPF=0.01 FPF=0.13
# An optional workind directory. param_runner will cd to this directory
# before beginning to run commands.
work_dir: /tmp/param_work_test
# The standard output from a command will be collected into a file named:
# out_<param1 val>_<param2 val>_<param3_val>.....out
# The standard error from a command will be collected into a file named:
# out_<param1 val>_<param2 val>_<param3_val>.....err
summary:
- id: True_Pos_Fraction
......@@ -31,9 +36,9 @@ cpus_per_task: 4
time_limit: 3-00:00:00
# Environment Module to Load
modules:
- matlab/2013a
- python/2.7.x-anaconda
#modules:
# - matlab/2013a
# - python/2.7.x-anaconda
# The list of parameters to explore
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment