fix(vault): handle buffer full state when current_index resets to 0#67
fix(vault): handle buffer full state when current_index resets to 0#67SimonDuToit merged 7 commits intoinstadeepai:mainfrom Dcyaprogrammer:fix-vault
Conversation
- Add condition that ensure writing full buffer on first write - Ensure data is not lost when buffer becomes full and index resets
- Apply black formatting to vault.py - Fix long condition statement formatting
|
Thanks for this! My only worry here is that this would silently fail if you called Open to opinions on which you think is better @Dcyaprogrammer @SimonDuToit? |
Yeah that's a good point. I think the warning idea can work better, but then it would be great to have a convenient method like "get_max_index" for buffer states so the user doesn't have to use |
|
Thank you for your careful reviews! I didn't think of this scenario. The warning idea clearly makes more sense to me. For "get_max_index" method, I can make another commit if you agree on this idea. However, I think it is necessary to determine where to put this method, making it an in-buffer method or an outside util. And I think maybe we can update the colab tutorial of vault to emphasize this since it's a quite common usage. |
|
@Dcyaprogrammer I think put the method in the And yes, please do update the colab tutorial 🙏 |
|
@sash-a @SimonDuToit I will add the warning and get_max_index method as soon as I can under this pr. After this I will open another pr to modify the tutorial. Is that ok for you guys |
|
As far as I know the size dim is always 1 yes |
SimonDuToit
left a comment
There was a problem hiding this comment.
One suggestion on the warning message
SimonDuToit
left a comment
There was a problem hiding this comment.
Happy with this, thanks for the changes!
SimonDuToit
left a comment
There was a problem hiding this comment.
Oh one thing I didn't notice, it seems the linter check is failing. I think you just need to rearrange the warning text so the first line is shorter.
this is the fix for issue @#66