Skip to content

Commit

Permalink
chore(deps): Create separate group for CV dependencies (#882)
Browse files Browse the repository at this point in the history
  • Loading branch information
setu4993 authored Dec 17, 2024
1 parent b5c68aa commit e8782d2
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 33 deletions.
2 changes: 1 addition & 1 deletion dataquality/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dataquality.get_insights()
"""

__version__ = "2.2.1"
__version__ = "2.3.0"

import sys
from typing import Any, List, Optional
Expand Down
4 changes: 3 additions & 1 deletion dataquality/loggers/data_logger/image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from dataquality.schemas.cv import GAL_LOCAL_IMAGES_PATHS
from dataquality.schemas.dataframe import BaseLoggerDataFrames
from dataquality.schemas.split import Split
from dataquality.utils.cv_smart_features import generate_smart_features
from dataquality.utils.upload import chunk_load_then_upload_df

# smaller than ITER_CHUNK_SIZE from base_data_logger because very large chunks
Expand Down Expand Up @@ -421,6 +420,9 @@ def add_cv_smart_features(cls, in_frame: DataFrame, split: str) -> DataFrame:
if GAL_LOCAL_IMAGES_PATHS not in in_frame.get_column_names():
return in_frame

# Import here because `imagededup` is not a required dependency.
from dataquality.utils.cv_smart_features import generate_smart_features

print(
f"🔲 Calculating Smart Features for split {split} (can take a few minutes "
"depending on the size of your dataset)"
Expand Down
9 changes: 5 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 28 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "dataquality"
version = "2.2.1"
version = "2.3.0"
description = ""
authors = ["Galileo Technologies, Inc. <[email protected]>"]
readme = "README.md"
Expand All @@ -17,7 +17,6 @@ scripts = { dqyolo = "dataquality.dqyolo:main" }
python = "^3.9,<3.11"
pydantic = ">=2.0.0"
requests = ">=2.25.1"
types-requests = ">=2.25.2"
pandas = ">=0.20.0"
pyarrow = ">=5.0.0"
vaex-core = "4.17.1"
Expand All @@ -34,51 +33,48 @@ datasets = ">=2.14.6"
transformers = ">=4.17.0"
seqeval = "*"
sentence-transformers = ">=2.2"
Pillow = "*"
h5py = ">=3.1.0"
numpy = "<1.24.0"
tenacity = ">=8.1.0"
evaluate = "*"
accelerate = "*"
ipywidgets = ">=8.1.0"
imagededup = ">=0.3.1,<0.3.2"
pyjwt = ">=2.8.0"
peft = "*"
# Pin opencv for linting incompatibility
opencv-python = "<=4.8.1.78"
pydantic-settings = ">=2.0.0"
minio = {version = ">=7.1.0,<7.2.0", optional=true}
setfit = {version ="==0.7.0", optional = true}
sentencepiece = "^0.2.0"

# cuda dependencies
ucx-py-cu12 = { version ="==0.36", source = "nvidia", optional = true }
rmm-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
raft-dask-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
pylibraft-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
dask-cudf-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
cudf-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
cuml-cu12 = {version = "==24.2.0", source = "nvidia", optional=true}
tensorflow = ">=2.9.1,<2.15.0"

minio = { version = ">=7.1.0,<7.2.0", optional = true }
setfit = { version = "==0.7.0", optional = true }

# * CV dependencies.
imagededup = { version = ">=0.3.1,<0.3.2", optional = true }
Pillow = { version = "*", optional = true }
# Pin opencv for linting incompatibility
opencv-python = { version = "<=4.8.1.78", optional = true }


[tool.poetry.group.dev.dependencies]
mypy = "^1.8.0"
invoke = ">=1.6.0"
pre-commit = "^3.6.1"
# * Cuda dependencies.
ucx-py-cu12 = { version = "==0.36", source = "nvidia", optional = true }
rmm-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
raft-dask-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
pylibraft-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
dask-cudf-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
cudf-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
cuml-cu12 = { version = "==24.2.0", source = "nvidia", optional = true }
tensorflow = ">=2.9.1,<2.15.0"


[tool.poetry.extras]
cv = ["imagededup", "opencv-python", "Pillow"]
cuda = [
"ucx-py-cu12",
"rmm-cu12",
"raft-dask-cu12",
"pylibraft-cu12",
"dask-cudf-cu12",
"cudf-cu12",
"cuml-cu12"
"cuml-cu12",
]
cuda11 = [
"ucx-py-cu11",
Expand All @@ -87,7 +83,7 @@ cuda11 = [
"pylibraft-cu11",
"dask-cudf-cu11",
"cudf-cu11",
"cuml-cu11"
"cuml-cu11",
]
cuda12 = [
"ucx-py-cu12",
Expand All @@ -96,7 +92,7 @@ cuda12 = [
"pylibraft-cu12",
"dask-cudf-cu12",
"cudf-cu12",
"cuml-cu12"
"cuml-cu12",
]
minio = ["minio"]
setfit = ["setfit"]
Expand All @@ -123,6 +119,7 @@ pytest-env = ">=0.8.1"
pytest-xdist = ">=2.4.0"
types-setuptools = ">=67.3.0.1"
types-cachetools = ">=4.2.4"
types-requests = ">=2.25.2"
torchvision = ">=0.13.1"
torch = ">=1.12.1"
torchtext = ">=0.13.1"
Expand All @@ -136,10 +133,15 @@ setfit = "==0.7.0"
accelerate = ">=0.19.0"
typing-inspect = "==0.8.0"
typing-extensions = ">=4.9.0"
lightning = "^2.3.1" # Assuming you want the latest version as no version was specified
lightning = "^2.3.1" # Assuming you want the latest version as no version was specified
pytest-mock = "^3.14.0"


[tool.poetry.group.dev.dependencies]
mypy = "^1.8.0"
invoke = ">=1.6.0"
pre-commit = "^3.6.1"


[[tool.poetry.source]]
name = "nvidia"
Expand Down
3 changes: 2 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
@task
def install(ctx: Context) -> None:
ctx.run(
"poetry install --extras minio --extras setfit --with test,dev --no-root",
"poetry install --extras minio --extras setfit --extras cv"
" --with test,dev --no-root",
echo=True,
)

Expand Down

0 comments on commit e8782d2

Please sign in to comment.