orbax
orbax copied to clipboard
Don't raise errors when directories don't exist.
Don't raise errors when directories don't exist.
Context: GCS doesn't support natively empty dirs. When using etils[epath-gcs] without tensorflow, but with the gcsfs backend, path.mkdirs does not create empty dirs. That's unlike the tensorflow gfile implementation, and is based on the fact that gcs doesn't really support directories, and that creating a file on a non-existent dir works fine.
This CL mitigates this subtlety by not raising errors when dirs don't exist, but instead defaulting to the empty-dir behavior in that case.