-
Notifications
You must be signed in to change notification settings - Fork 348
Open
Labels
Description
Currently log is represented as a defaultdict and the interface is always assuming that it is a defaultdict which makes a bit hard to implement new backends. I had some troubles mimicking this interface when I was implementing jsonlines-based log #1013. So it would be great to restrict the interface a bit and make it more explicit to allow more complicated backends.
In particular, I'd like to see in the interface:
- Log should be always included in a context manager to (de)allocate resources properly
- Separate read+write and read-only regimes
- A standard way to tell that a new iteration has started
- It should be a way to tell what is the number of past entries accessible to read/change
- Discourage modification of rows other than the current row and the previous row
(It is mostly for myself, to arrange my thoughts, I'm happy to hear your suggestions)
Reactions are currently unavailable