dnadna init bugs when not using a template
Hello,
The following command crashes:
dnadna init
an unexpected error occurred: local variable 'simulation_config' referenced before assignment; run again with --debug to view the full traceback
With debug:
dnadna init --debug output
dnadna init --debug
an unexpected error occurred: local variable 'simulation_config' referenced before assignment; run again with --debug to view the full traceback
an unexpected error occurred: local variable 'simulation_config' referenced before assignment; run again with --debug to view the full traceback
Traceback (most recent call last):
File "/home/jean/anaconda3/envs/dnadna/bin/dnadna", line 11, in <module>
load_entry_point('dnadna', 'console_scripts', 'dnadna')()
File "/home/jean/Documents/Git/dnadna/dnadna/utils/__init__.py", line 798, in main
raise exc
File "/home/jean/Documents/Git/dnadna/dnadna/utils/__init__.py", line 790, in main
ret2 = cls.run_subcommand(args)
File "/home/jean/Documents/Git/dnadna/dnadna/utils/__init__.py", line 759, in run_subcommand
return command_cls.main(command[1:], namespace=args)
File "/home/jean/Documents/Git/dnadna/dnadna/utils/__init__.py", line 798, in main
raise exc
File "/home/jean/Documents/Git/dnadna/dnadna/utils/__init__.py", line 782, in main
ret = cls.run(args)
File "/home/jean/Documents/Git/dnadna/dnadna/data_preprocessing.py", line 574, in run
sim_name = simulation_config.get('simulator_name')
UnboundLocalError: local variable 'simulation_config' referenced before assignment
Although it shouldn't as per the docstring froom dnadna init --help
usage: dnadna init [-h]
[--list-templates | --show-template {default,one_event} | -t {default,one_event}]
[-c SIMULATION_CONFIG] [-m MODEL_NAME]
[MODELS-ROOT]
Initialize a new model training configuration and directory structure.
I expect that dnadna init
creates a default directory structure and config files (training and simulation files) with default names. Using dnadna init -m my_model
should behave similarly except that it uses the model "my_model".