Skip to content

Commit

Permalink
Default to mkdirs behavior in async_makedirs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 464131053
  • Loading branch information
Haitang Hu authored and copybara-github committed Jul 29, 2022
1 parent 4b5e9b1 commit 128961c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions orbax/checkpoint/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ async def run(*args, loop=None, executor=None, **kwargs):


# TODO(cpgaffney): This functionality should be provided by an external library.
def async_makedirs(path, *args, **kwargs):
return _wrap(path.mkdir)(*args, **kwargs)
def async_makedirs(path,
*args,
parents: bool = True,
exist_ok: bool = True,
**kwargs):
return _wrap(path.mkdir)(*args, parents=parents, exist_ok=exist_ok, **kwargs)


def register_ts_spec_for_serialization():
Expand Down

0 comments on commit 128961c

Please sign in to comment.