From 3f2f5f9cb39a1fe183144b84f705ab3ade744a82 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 22 Jun 2020 12:14:51 +0200 Subject: [PATCH] Remove ml_datasets from install dependencies --- setup.cfg | 1 - spacy/cli/profile.py | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 20b2dfa1c..5bda29c68 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,6 @@ install_requires = wasabi>=0.7.0,<1.1.0 srsly>=2.1.0,<3.0.0 catalogue>=0.0.7,<1.1.0 - ml_datasets>=0.1.1 typer>=0.2.1,<1.0.0 # Third-party dependencies tqdm>=4.38.0,<5.0.0 diff --git a/spacy/cli/profile.py b/spacy/cli/profile.py index f4c893864..ee9f3e707 100644 --- a/spacy/cli/profile.py +++ b/spacy/cli/profile.py @@ -6,7 +6,6 @@ import cProfile import pstats import sys import itertools -import ml_datasets from wasabi import msg, Printer from ._app import app, Arg, Opt @@ -32,6 +31,14 @@ def profile_cli( def profile(model: str, inputs: Optional[Path] = None, n_texts: int = 10000) -> None: + try: + import ml_datasets + except ImportError: + msg.fail( + "This command requires the ml_datasets library to be installed:" + "pip install ml_datasets", + exits=1, + ) if inputs is not None: inputs = _read_inputs(inputs, msg) if inputs is None: