Skip to content

Commit 7d403a6

Browse files
committed
adding auth
1 parent 9fc4848 commit 7d403a6

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

ads/opctl/cli.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import ads.opctl.model.cli
1717
import ads.opctl.spark.cli
1818
from ads.common import auth as authutil
19+
from ads.common.auth import AuthType
1920
from ads.opctl.cmds import activate as activate_cmd
2021
from ads.opctl.cmds import cancel as cancel_cmd
2122
from ads.opctl.cmds import configure as configure_cmd
@@ -29,12 +30,8 @@
2930
from ads.opctl.cmds import run_diagnostics as run_diagnostics_cmd
3031
from ads.opctl.cmds import watch as watch_cmd
3132
from ads.opctl.config.merger import ConfigMerger
32-
from ads.opctl.constants import (
33-
BACKEND_NAME,
34-
DEFAULT_MODEL_FOLDER,
35-
RESOURCE_TYPE,
36-
RUNTIME_TYPE,
37-
)
33+
from ads.opctl.constants import (BACKEND_NAME, DEFAULT_MODEL_FOLDER,
34+
RESOURCE_TYPE, RUNTIME_TYPE)
3835
from ads.opctl.utils import build_image as build_image_cmd
3936
from ads.opctl.utils import publish_image as publish_image_cmd
4037
from ads.opctl.utils import suppress_traceback
@@ -618,6 +615,13 @@ def init(debug: bool, **kwargs: Dict[str, Any]) -> None:
618615
required=False,
619616
help="When the `inference_server='triton'`, the name of the model to invoke. This can only be used when model deployment id is passed in. For the other cases, it will be ignored.",
620617
)
618+
@click.option(
619+
"--auth",
620+
"-a",
621+
help="authentication method",
622+
type=click.Choice(AuthType.values()),
623+
default=None,
624+
)
621625
@click.option("--debug", "-d", help="set debug mode", is_flag=True, default=False)
622626
def predict(**kwargs):
623627
"""

0 commit comments

Comments
 (0)