Is it possible to save the settings to editable config file? #200
-
i saved the the config file using vbt.settings.save('my_settings') but the file is not readable from Notepad++ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No, it's not possible, because settings are not a simple dict but a config object that also needs to save its own state. Plus you must remember that settings not only contain primitive data types but also lambda functions and other complex objects, so you won't be able to edit them in any editor anyway once they are serialized (and this using a third-party library). You can only save and load a config. To edit it, you need Python. Edit: what I can implement is the following: the user can set an environment variable with the path to the YAML or JSON file with settings that should override the vectorbt's settings. Upon the first import of vectorbt, it will read that file and override the found keys and values. During runtime, you can edit YAML using your editor and then call |
Beta Was this translation helpful? Give feedback.
No, it's not possible, because settings are not a simple dict but a config object that also needs to save its own state. Plus you must remember that settings not only contain primitive data types but also lambda functions and other complex objects, so you won't be able to edit them in any editor anyway once they are serialized (and this using a third-party library). You can only save and load a config. To edit it, you need Python.
Edit: what I can implement is the following: the user can set an environment variable with the path to the YAML or JSON file with settings that should override the vectorbt's settings. Upon the first import of vectorbt, it will read that file and override the fo…