spoonsso / dannce

MIT License
214 stars 30 forks source link

.yaml configuration files #6

Closed diegoaldarondo closed 4 years ago

diegoaldarondo commented 5 years ago

Can we switch configuration files to yaml format?

The current cfg reading process splits variables and values with .split(':') which messes with windows drive paths like C:\path\to\data. https://github.com/spoonsso/DANNCE/blob/836745e5e7e4e5d8c9a4ba22b6bb13c224cac2c3/dannce/engine/processing.py#L266

I've written around it for now for @wlwang20 's implementation by changing the ':' to '*', but it would be nice to have a consistent version. This is handled nicely in yaml, and the reading/writing functions are python 3.x built-ins.

spoonsso commented 5 years ago

great idea. I can get on this and other refactoring soon. I have a big commit coming...

diegoaldarondo commented 5 years ago

Related note, config variables specifying the model or loss function should specified as

net: model_name
loss: loss_name

rather than

net: nets.model_name
loss: losses.loss_name

The latter causes problems with the params['net'] = getattr(nets, params['net']) imports in the scripts.

spoonsso commented 4 years ago

configs are now yaml