diff --git a/poetry.lock b/poetry.lock index de29df22c..1aef42d7e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1372,8 +1372,11 @@ name = "docutils" version = "0.18.1" description = "Docutils -- Python Documentation Utilities" optional = false -python-versions = "*" -files = [] +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "docutils-0.18.1-py2.py3-none-any.whl", hash = "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c"}, + {file = "docutils-0.18.1.tar.gz", hash = "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"}, +] [[package]] name = "entrypoints" @@ -3511,34 +3514,6 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] -[[package]] -name = "narwhals" -version = "1.28.0" -description = "Extremely lightweight compatibility layer between dataframe libraries" -optional = false -python-versions = ">=3.8" -files = [ - {file = "narwhals-1.28.0-py3-none-any.whl", hash = "sha256:45d909ad6240944d447b0dae38074c5a919830dff3868d57b05a5526c1f06fe4"}, - {file = "narwhals-1.28.0.tar.gz", hash = "sha256:a2213fa44a039f724278fb15609889319e7c240403413f2606cc856c8d8f708d"}, -] - -[package.extras] -core = ["duckdb", "pandas", "polars", "pyarrow", "pyarrow-stubs"] -cudf = ["cudf (>=24.10.0)"] -dask = ["dask[dataframe] (>=2024.8)"] -dev = ["covdefaults", "hypothesis", "mypy (>=1.15.0,<1.16.0)", "pandas-stubs", "pre-commit", "pyright", "pytest", "pytest-cov", "pytest-env", "pytest-randomly", "typing-extensions"] -docs = ["black", "duckdb", "jinja2", "markdown-exec[ansi]", "mkdocs", "mkdocs-autorefs", "mkdocs-material", "mkdocstrings-python (>=1.16)", "mkdocstrings[python]", "pandas", "polars (>=1.0.0)", "pyarrow"] -duckdb = ["duckdb (>=1.0)"] -extra = ["scikit-learn"] -ibis = ["ibis-framework (>=6.0.0)", "packaging", "pyarrow-hotfix", "rich"] -modin = ["modin"] -pandas = ["pandas (>=0.25.3)"] -polars = ["polars (>=0.20.3)"] -pyarrow = ["pyarrow (>=11.0.0)"] -pyspark = ["pyspark (>=3.5.0)"] -tests = ["covdefaults", "hypothesis", "pytest", "pytest-cov", "pytest-env", "pytest-randomly", "typing-extensions"] -typing = ["mypy (>=1.15.0,<1.16.0)", "pandas-stubs", "pyright", "typing-extensions"] - [[package]] name = "nbclient" version = "0.10.1" @@ -4155,8 +4130,8 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, ] python-dateutil = ">=2.8.2" pytz = ">=2020.1" @@ -4508,21 +4483,18 @@ type = ["mypy (>=1.11.2)"] [[package]] name = "plotly" -version = "6.0.0" +version = "5.24.1" description = "An open-source, interactive data visualization library for Python" optional = false python-versions = ">=3.8" files = [ - {file = "plotly-6.0.0-py3-none-any.whl", hash = "sha256:f708871c3a9349a68791ff943a5781b1ec04de7769ea69068adcd9202e57653a"}, - {file = "plotly-6.0.0.tar.gz", hash = "sha256:c4aad38b8c3d65e4a5e7dd308b084143b9025c2cc9d5317fc1f1d30958db87d3"}, + {file = "plotly-5.24.1-py3-none-any.whl", hash = "sha256:f67073a1e637eb0dc3e46324d9d51e2fe76e9727c892dde64ddf1e1b51f29089"}, + {file = "plotly-5.24.1.tar.gz", hash = "sha256:dbc8ac8339d248a4bcc36e08a5659bacfe1b079390b8953533f4eb22169b4bae"}, ] [package.dependencies] -narwhals = ">=1.15.1" packaging = "*" - -[package.extras] -express = ["numpy"] +tenacity = ">=6.2.0" [[package]] name = "plotly-express" @@ -7977,4 +7949,4 @@ pytorch = ["torch"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<3.12" -content-hash = "f5ba5f0244769e7e6e75d1f82a33b6267b57ec6d456a13f1da1b3a3399eff3f5" +content-hash = "0765c86a78b5cf83a7a88a16e23f0c5e3a410de541ec12321e82db6f4321c675" diff --git a/pyproject.toml b/pyproject.toml index f5c8879fb..287a23278 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ description = "ValidMind Library" license = "Commercial License" name = "validmind" readme = "README.pypi.md" -version = "2.7.11" +version = "2.7.12" [tool.poetry.dependencies] aiohttp = {extras = ["speedups"], version = "*"} @@ -33,7 +33,7 @@ numba = "<0.59.0" # TODO: https://github.com/validmind/validmind-library/pull/28 numpy = "*" openai = ">=1" pandas = ">=1.1,<=2.0.3" -plotly = "*" +plotly = "<6.0.0" plotly-express = "*" polars = "*" pycocoevalcap = {version = "^1.2", optional = true} diff --git a/validmind/__version__.py b/validmind/__version__.py index 74ceb7f10..d3874a41b 100644 --- a/validmind/__version__.py +++ b/validmind/__version__.py @@ -1 +1 @@ -__version__ = "2.7.11" +__version__ = "2.7.12" diff --git a/validmind/vm_models/result/utils.py b/validmind/vm_models/result/utils.py index 7455e36c8..4e1ec999c 100644 --- a/validmind/vm_models/result/utils.py +++ b/validmind/vm_models/result/utils.py @@ -44,31 +44,12 @@ async def update_metadata(content_id: str, text: str, _json: Union[Dict, List] = content_id = parts[0] revision_name = parts[1] if len(parts) > 1 else None - # we always want composite metric definitions to be updated - should_update = content_id.startswith("composite_metric_def:") - - # if we are updating a metric or test description, we check if the text - # has changed from the last time it was logged, and only update if it has - if content_id.split(":", 1)[0] in ["metric_description", "test_description"]: - try: - md = await api_client.aget_metadata(content_id) - # if there is an existing description, only update it if the new one - # is different and is an AI-generated description - should_update = ( - md["text"] != text if revision_name == AI_REVISION_NAME else False - ) - logger.debug(f"Check if description has changed: {should_update}") - except Exception: - # if exception, assume its not created yet TODO: don't catch all - should_update = True - - if should_update: - if revision_name: - content_id = f"{content_id}::{revision_name}" + if revision_name: + content_id = f"{content_id}::{revision_name}" - logger.debug(f"Updating metadata for `{content_id}`") + logger.debug(f"Updating metadata for `{content_id}`") - await api_client.alog_metadata(content_id, text, _json) + await api_client.alog_metadata(content_id, text, _json) def check_for_sensitive_data(data: pd.DataFrame, inputs: List[VMInput]):