Skip to content

Commit 8b747f9

Browse files
authored
Change default option 'full' to 'base' in otx install (#3937)
* Change option full to base for otx install * Fix wrong code * Fix issue * Fix docs
1 parent c2ccfc9 commit 8b747f9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docs/source/guide/get_started/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ according to your system environment.
6262

6363
.. code-block:: shell
6464
65-
otx install -v
65+
otx install -v --option full
6666
6767
[Optional] Refer to the `torch official installation guide <https://pytorch.org/get-started/previous-versions/>`_
6868

src/otx/cli/install.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def add_install_parser(subcommands_action: _ActionSubCommands) -> None:
4949
parser = ArgumentParser()
5050
parser.add_argument(
5151
"--option",
52-
help="Install the mmlab library or optional-dependencies.",
53-
default="full",
52+
help="Install optional-dependencies. The 'full' option will install all dependencies.",
53+
default="base",
5454
type=str,
5555
)
5656
parser.add_argument(
@@ -123,7 +123,7 @@ def otx_install(
123123
)
124124

125125
# Parse mmX requirements if the task requires mmX packages.
126-
mmcv_install_args = ["--user"] if user else []
126+
mmcv_install_args = []
127127
if mmcv_requirements:
128128
mmcv_install_args = get_mmcv_install_args(torch_requirement, mmcv_requirements)
129129
install_args += ["openmim"]
@@ -146,6 +146,8 @@ def otx_install(
146146

147147
# Install mmX requirements if the task requires mmX packages using mim.
148148
if mmcv_install_args and status_code == 0:
149+
if user:
150+
mmcv_install_args.append("--user")
149151
console.log(f"Installation list: [yellow]{mmcv_install_args}[/yellow]")
150152
status_code = mim_installation(mmcv_install_args)
151153
if status_code == 0:

0 commit comments

Comments
 (0)