-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add placeholder torch.load and torch.save frontends
- Loading branch information
1 parent
4278aab
commit da92c0f
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .serialization import * |
28 changes: 28 additions & 0 deletions
28
ivy/functional/frontends/torch/serialization/serialization.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# global | ||
from typing import Any, Optional | ||
|
||
# local | ||
import ivy | ||
|
||
|
||
def load( | ||
f, | ||
map_location=None, | ||
pickle_module: Any = None, | ||
*, | ||
weights_only: Optional[bool] = None, | ||
mmap: Optional[bool] = None, | ||
**pickle_load_args: Any, | ||
) -> Any: | ||
raise ivy.exceptions.IvyNotImplementedException("The `torch.load` frontend has not yet been implemented.") | ||
|
||
|
||
def save( | ||
obj: object, | ||
f, | ||
pickle_module: Any = None, | ||
pickle_protocol: int = 2, | ||
_use_new_zipfile_serialization: bool = True, | ||
_disable_byteorder_record: bool = False | ||
) -> None: | ||
raise ivy.exceptions.IvyNotImplementedException("The `torch.save` frontend has not yet been implemented.") |