From dc4e3419fe569f355c9d9fd79d5cf3cdf2afe232 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Fri, 19 Dec 2025 18:50:39 +0000 Subject: [PATCH 1/2] Expose log_test_result function as public API This allows a user to skip most of the vm-library machinery and just send results to ValidMind. Amp-Thread-ID: https://ampcode.com/threads/T-0d15caf4-4ac4-4ff4-b7e1-9be6ed2590f7 Co-authored-by: Amp --- validmind/__init__.py | 3 ++- validmind/api_client.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/validmind/__init__.py b/validmind/__init__.py index 5b96ea574..8093f59af 100644 --- a/validmind/__init__.py +++ b/validmind/__init__.py @@ -50,7 +50,7 @@ from . import scorer from .__version__ import __version__ # noqa: E402 -from .api_client import init, log_metric, log_text, reload +from .api_client import init, log_metric, log_test_result, log_text, reload from .client import ( # noqa: E402 get_test_suite, init_dataset, @@ -143,6 +143,7 @@ def check_version(): "unit_metrics", "test_suites", "log_text", + "log_test_result", # experimental features "experimental_agent", ] diff --git a/validmind/api_client.py b/validmind/api_client.py index c0d14dac8..d5722efdb 100644 --- a/validmind/api_client.py +++ b/validmind/api_client.py @@ -365,6 +365,35 @@ async def alog_test_result( raise e +def log_test_result( + result: Dict[str, Any], + section_id: str = None, + position: int = None, + unsafe: bool = False, + config: Dict[str, bool] = None, +) -> Dict[str, Any]: + """Logs test results information. + + Args: + result (dict): A dictionary representing the test result. + section_id (str, optional): The section ID add a test driven block to the documentation. + position (int): The position in the section to add the test driven block. + unsafe (bool): If True, log the result even if it contains sensitive data. + config (Dict[str, bool]): Configuration options for displaying the test result. + + Returns: + dict: The response from the API. + """ + return run_async( + alog_test_result, + result=result, + section_id=section_id, + position=position, + unsafe=unsafe, + config=config, + ) + + async def alog_input( input_id: str, type: str, metadata: Dict[str, Any] ) -> Dict[str, Any]: From 3fdf893c3637a38cf81d3879dd99cc897b1ffaaf Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Fri, 2 Jan 2026 16:42:33 -0600 Subject: [PATCH 2/2] Bump version from 2.11.0 to 2.11.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b171896cc..ce47b3dff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "validmind" -version = "2.11.0" +version = "2.11.1" description = "ValidMind Library" readme = "README.pypi.md" requires-python = ">=3.9,<3.13"