Skip to content

Commit

Permalink
Change default option 'full' to 'base' in otx install (#3937)
Browse files Browse the repository at this point in the history
* Change option full to base for otx install

* Fix wrong code

* Fix issue

* Fix docs
  • Loading branch information
harimkang authored Sep 9, 2024
1 parent c2ccfc9 commit 8b747f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/guide/get_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ according to your system environment.

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

Expand Down
8 changes: 5 additions & 3 deletions src/otx/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def add_install_parser(subcommands_action: _ActionSubCommands) -> None:
parser = ArgumentParser()
parser.add_argument(
"--option",
help="Install the mmlab library or optional-dependencies.",
default="full",
help="Install optional-dependencies. The 'full' option will install all dependencies.",
default="base",
type=str,
)
parser.add_argument(
Expand Down Expand Up @@ -123,7 +123,7 @@ def otx_install(
)

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

# Install mmX requirements if the task requires mmX packages using mim.
if mmcv_install_args and status_code == 0:
if user:
mmcv_install_args.append("--user")
console.log(f"Installation list: [yellow]{mmcv_install_args}[/yellow]")
status_code = mim_installation(mmcv_install_args)
if status_code == 0:
Expand Down

0 comments on commit 8b747f9

Please sign in to comment.