orbax icon indicating copy to clipboard operation
orbax copied to clipboard

Enable saving (and loading) zero size arrays

Open pcmoritz opened this issue 1 month ago • 0 comments

Dear all,

I wonder if it would be possible to support saving and loading zero size arrays. I saw it was deactivated in https://github.com/google/orbax/pull/1570. Allowing it would be very useful for us for saving rank 0 lora adapters for https://github.com/NovaSky-AI/SkyRL/tree/main/skyrl-tx (we use rank 0 lora adapters to allow users to selectively deactivate adapters for certain layers). Currently we have to write a bunch of code to work around this, whereas I don't see a reason why orbax shouldn't be able to handle it, since zero size arrays are valid arrays.

All the best and let us know if you have any further questions about the use case.

-- Philipp.

pcmoritz avatar Nov 15 '25 01:11 pcmoritz