Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 11 additions & 39 deletions poetry.lock

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

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "*"}
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion validmind/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.7.11"
__version__ = "2.7.12"
27 changes: 4 additions & 23 deletions validmind/vm_models/result/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
Loading