-
Notifications
You must be signed in to change notification settings - Fork 3
Labels
Description
Currently, PyLCM only provides a debug_mode: bool flag, which activates status printing.
I suggest the following:
Conceptually, we should differentiate between being verbose, and logging. In the former, PyLCM will try to communicate what it is doing when, with an estimate of how long it will take. In the latter, PyLCM will try to save as much information per period as possible, in order to facilitate ex-post usage of interim results or debugging by the user.
Verbose:
- We create a new boolean flag called
verbose, which is used as follows - We use tqdm to show progress bars:
# in solve_brute.py ... reversed_periods_range = tqdm( reversed(range(n_periods)), desc="Solution progress", total=n_periods, disable=not verbose, ) for period in reversed_periods_range: ... ```
Logging:
- We add a new argument called
logging, which controls whether data is written to disc or not. This should be:bool:Logging is either deactivated (False), or activated with a generated log-path (True)str | Path:Logging is activated and the file will be written to the path (if parents exist, otherwise error)
- Each period, we write the value function array to disc. Here we need to check:
- How big can these arrays get for large models
- What is the best file-format for n-dimensional JAX arrays
- How do we also store the information on which state corresponds to which axis (potentially use xarray)