Add more useful return value
This commit is contained in:
parent
2c516cf861
commit
c0c88d6059
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ from ..context import get_context
|
||||||
|
|
||||||
def save_model(
|
def save_model(
|
||||||
model: Union[Path, str, object], key: str, keep_last_n: Optional[int] = None
|
model: Union[Path, str, object], key: str, keep_last_n: Optional[int] = None
|
||||||
) -> int:
|
) -> str:
|
||||||
get_context() # will setup LargeFile if there was no config set
|
get_context() # will setup LargeFile if there was no config set
|
||||||
|
|
||||||
file = LargeFile(name=key, mode="wb", keep_last_n=keep_last_n)
|
file = LargeFile(name=key, mode="wb", keep_last_n=keep_last_n)
|
||||||
|
|
@ -23,4 +23,4 @@ def save_model(
|
||||||
|
|
||||||
get_context().logger.info(f"Model {key} uploaded with version {file.version}")
|
get_context().logger.info(f"Model {key} uploaded with version {file.version}")
|
||||||
|
|
||||||
return file.version
|
return f"{key}:{file.version}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue