diff --git a/dvc/command/experiments.py b/dvc/command/experiments.py index a8d591f4ad..258c61b181 100644 --- a/dvc/command/experiments.py +++ b/dvc/command/experiments.py @@ -112,7 +112,11 @@ def _show_experiments(all_experiments, console, precision=None): class CmdExperimentsShow(CmdBase): def run(self): - from rich.console import Console + try: + from rich.console import Console + except ImportError: + logger.error("Missing experiments feature dependencies.") + return 0 from dvc.utils.pager import pager if not self.repo.experiments: diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh index f1a5defc02..585eba6614 100644 --- a/scripts/ci/install.sh +++ b/scripts/ci/install.sh @@ -8,7 +8,7 @@ scriptdir="$(dirname $0)" # NOTE: it is not uncommon for pip to hang on travis for what seems to be # networking issues. Thus, let's retry a few times to see if it will eventually # work or not. -$scriptdir/retry.sh pip install .[all,tests] +$scriptdir/retry.sh pip install .[all,tests,experiments] git config --global user.email "dvctester@example.com" git config --global user.name "DVC Tester" diff --git a/setup.py b/setup.py index b90e9b05af..77bb6d81b3 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,6 @@ def run(self): "pygtrie==2.3.2", "dpath>=2.0.1,<3", "shtab>=1.1.0,<2", - "rich>=3.0.5", ] @@ -138,6 +137,11 @@ def run(self): "filelock", ] +# Extra dependencies for under development experiments feature +experiments_requirements = [ + "rich>=3.0.5", +] + if (sys.version_info) >= (3, 6): tests_requirements.append("black==19.10b0") @@ -163,6 +167,7 @@ def run(self): "hdfs": hdfs, "webdav": webdav, "tests": tests_requirements, + "experiments": experiments_requirements, }, keywords="data-science data-version-control machine-learning git" " developer-tools reproducibility collaboration ai",