diff --git a/argilla/docs/how_to_guides/migrate_from_legacy_datasets.md b/argilla/docs/how_to_guides/migrate_from_legacy_datasets.md index ad8d513e62..5b5c9a7a79 100644 --- a/argilla/docs/how_to_guides/migrate_from_legacy_datasets.md +++ b/argilla/docs/how_to_guides/migrate_from_legacy_datasets.md @@ -26,8 +26,12 @@ The guide will take you through three steps: ### Step 1: Retrieve the legacy dataset -Connect to the Argilla V1 server via the new `argilla` package. The new sdk contains a `v1` module that allows you to connect to the Argilla V1 server: +Connect to the Argilla V1 server via the new `argilla` package. First, you should install an extra dependency: +```bash +pip install "argilla[v1]" +``` +Now, you can use the `v1` module to connect to the Argilla V1 server. ```python import argilla.v1 as rg_v1 diff --git a/argilla/pyproject.toml b/argilla/pyproject.toml index 114ce0bdf3..b445ba7263 100644 --- a/argilla/pyproject.toml +++ b/argilla/pyproject.toml @@ -13,7 +13,7 @@ dynamic = ["version"] dependencies = [ "httpx>=0.26.0", "pydantic>=2.6.0, <3.0.0", - "argilla-v1[listeners]", + "tqdm>=4.60.0", "rich>=10.0.0", ] @@ -23,6 +23,10 @@ io = [ "datasets>=2.0.0", ] +v1 = [ + "argilla-v1[listeners]", +] + [build-system] requires = ["pdm-backend"] build-backend = "pdm.backend" diff --git a/argilla/src/argilla/v1/__init__.py b/argilla/src/argilla/v1/__init__.py index 75284d237e..3ad81a537f 100644 --- a/argilla/src/argilla/v1/__init__.py +++ b/argilla/src/argilla/v1/__init__.py @@ -14,7 +14,12 @@ import warnings -from argilla_v1 import * # noqa +try: + from argilla_v1 import * # noqa +except ModuleNotFoundError as ex: + raise Exception( + 'The package argilla-v1 is not installed. Please install it by typing: pip install "argilla[v1]"', + ) from ex def deprecation(message: str): @@ -23,5 +28,5 @@ def deprecation(message: str): deprecation( "The module `argilla_sdk.v1` has been include for migration purposes. " - "It's deprecated and will be removed in the future" + "It's deprecated and will be removed in the future." )