Closed frexvahi closed 7 years ago
job.py is just print("Hello, world!")
. data.yml is some random YAML.
$ cat data.yml
a:
b:
- 3
- 7
After renaming to 'data.yaml' it works
$ smt run --executable=/usr/bin/python3 --main=job.py data.yaml
Hello, world
Record label for this run: '20170512-175829'
No data produced.
This happens both with the latest release (pip install sumatra
) and the github master (pip install git+ssh://git@github.com/open-research/sumatra.git
)
Running in the debugger shows that the parameters file has been detected as a NTParameterSet
. The YAML has however been parsed correctly.
$ python -m pdb `which smt` run --executable=/usr/bin/python3 --main=job.py data.yml
> /home/cjk/.conda/envs/sumatra/bin/smt(4)<module>()
-> """
(Pdb) c
Traceback (most recent call last):
. . .
TypeError: save() got an unexpected keyword argument 'add_extension'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /home/cjk/.conda/envs/sumatra/lib/python2.7/site-packages/sumatra/programs.py(126)write_parameters()
-> filename = parameters.save(filebasename, add_extension=True)
(Pdb) p type(parameters)
<class 'sumatra.parameters.NTParameterSet'>
(Pdb) p parameters
{'a': {'b': [3, 7]}}
The specific error was fixed in #359, so you should be ok with the latest master.
The file is still not detected as a YAML file, however. I've created #367 to address this.