diff --git a/gto/api.py b/gto/api.py index 092cb45f..e0e1a16c 100644 --- a/gto/api.py +++ b/gto/api.py @@ -210,7 +210,8 @@ def deregister( def deprecate( repo: Union[str, Repo], name: str, - message: str = None, + ref: Optional[str] = None, + message: Optional[str] = None, stdout: bool = False, simple: Optional[bool] = None, force: bool = False, @@ -222,6 +223,7 @@ def deprecate( with GitRegistry.from_repo(repo) as reg: return reg.deprecate( name=name, + ref=ref, message=message, stdout=stdout, simple=simple, diff --git a/gto/cli.py b/gto/cli.py index 5f36658c..ae7896e4 100644 --- a/gto/cli.py +++ b/gto/cli.py @@ -579,6 +579,9 @@ def deprecate( name: str = arg_name, version: str = Argument(None, help="Artifact version"), stage: str = Argument(None, help="Stage to unassign"), + ref: Optional[str] = Option( + None, "--ref", help="Git reference to use (for model deprecation)" + ), message: Optional[str] = option_message, simple: str = option_simple, force: bool = option_force, @@ -615,6 +618,7 @@ def deprecate( gto.api.deprecate( repo=repo, name=name, + ref=ref, message=message, simple=simple, # type: ignore force=force,