Skip to content

Commit

Permalink
Ignore bandit warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Ankita Katiyar <[email protected]>
  • Loading branch information
ankatiyar committed Sep 25, 2024
1 parent e66ce25 commit 9e594ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ def _describe(self) -> dict[str, Any]:

def _load(self) -> Any:
load_path = get_filepath_str(self._get_load_path(), self._protocol)
return torch.load(load_path, **self._fs_open_args_load)
return torch.load(load_path, **self._fs_open_args_load) #nosec: B614

def _save(self, data: torch.nn.Module) -> None:
save_path = get_filepath_str(self._get_save_path(), self._protocol)
torch.save(data.state_dict(), save_path, **self._fs_open_args_save)
torch.save(data.state_dict(), save_path, **self._fs_open_args_save) #nosec: B614

self._invalidate_cache()

Expand Down

0 comments on commit 9e594ed

Please sign in to comment.