Is there a best practice for storing and reading model parameters? (In plain text.)
In Python, I would just use JSON because there’s a fairly straightforward mapping of the JSON syntax to the objects I wanted in Python, and the parsing in and out was essentially one call to the JSON library. In Julia, I’m finding there’s no real way to represent Julia data with JSON, so that I’m ending up with somewhat hack-y code to get the particular values parsed to the right types.
The solution I’m leaning towards now is putting my config/parameters in a separate module. This has the advantages that:
- It’s plain text
- It’s separate from the model code
- It can use any Julia type
Am I missing something? On the one hand, this feels wrong/hack-y. On the other hand, this seems like it’s the perfect solution.