Skip to content

Commit

Permalink
Code update
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 696505864
  • Loading branch information
Martin Huschenbett authored and The kauldron Authors committed Nov 14, 2024
1 parent b1dfc82 commit a8b1a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kauldron/checkpoints/lazy_checkpoint_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def save(
step,
args=state.__kd_ocp_save_args__(),
force=force,
)
) # pytype: disable=bad-return-type

def restore(self, state: _StateT, *, step: int) -> _StateT:
"""Wrapper around `ocp.CheckpointManager.restore`."""
Expand Down
4 changes: 2 additions & 2 deletions kauldron/kontext/glob_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _set_in(

# During glob, the object might contains branch which do not match
if missing_ok and part not in wrapper:
return # Leaf not found, do not assign this branch
return # Leaf not found, do not assign this branch # pytype: disable=bad-return-type

if not rest: # Nothing left to recurse on, assign the leaf.
if isinstance(part, path_parser.Wildcard):
Expand All @@ -251,5 +251,5 @@ def _set_in(
_set_in(new_context, parts, value) # Propagate the `**` to the leaves
else: # Otherwise, recurse.
for _, new_context in wrapper.get_items(part):
_set_in(new_context, rest, value)
_set_in(new_context, rest, value) # pytype: disable=bad-return-type
# TODO(epot): Reraise with the full path branch in which the error occured

0 comments on commit a8b1a8d

Please sign in to comment.