parameter file changes to relative path

25 views
Skip to first unread message

Jacob

unread,
Aug 16, 2016, 7:45:46 PM8/16/16
to sumatra-users
Hi,

I notice that when a JSON file is given as an argument to smt run, the actual file that is passed to the executable has a different name - e.g. 20160817-021752.json . Is there a way to turn off this behavior and make it so the original path is given as input? Or alternatively, to use the full (absolute) path to this intermediate JSON file.

The reason it is problematic for me is that the given path is relative. I am using a wrapper bash script as the executable (-e), and another script as the main (-m). The wrapper creates a directory for an experiment, changes dir to that directory and then runs the main script, passing to it all the original parameters. In the original call, the path to the JSON was absolute so it worked, but when run from smt the path is relative, so unless the wrapper parses the arguments and updates the path, the main script will not find the file.

Regards,
Jacob


Andrew Davison

unread,
Aug 17, 2016, 4:59:42 AM8/17/16
to sumatra-users
Hi Jacob,


On Wednesday, 17 August 2016 01:45:46 UTC+2, Jacob wrote:
Hi,

I notice that when a JSON file is given as an argument to smt run, the actual file that is passed to the executable has a different name - e.g. 20160817-021752.json .

Yes; the intention of this is to allow parameters to be modified from the command line.
 
Is there a way to turn off this behavior and make it so the original path is given as input? Or alternatively, to use the full (absolute) path to this intermediate JSON file.

It is not currently possible to turn this behaviour off. However, there is a "--plain" option to "smt configure" which does something similar, and my first impression is that we could extend the meaning of "--plain" to include your use case. Please could you post your message as a ticket in the issue tracker (https://github.com/open-research/sumatra/issues/new) to ensure it gets followed up?

Juggling absolute and relative paths has always been a challenge in Sumatra development (symbolic links, network file systems, remote execution all complicate the issue); at some point there should be a systematic attempt to solve the problem properly but no one has yet taken this on.
 
Regards,

Andrew

Jacob

unread,
Aug 19, 2016, 7:09:43 AM8/19/16
to sumatra-users
Reply all
Reply to author
Forward
0 new messages