From d4da4dac352684effc9cb65c2c1273cf8cadf640 Mon Sep 17 00:00:00 2001 From: "Craig.Walton" Date: Fri, 10 Jan 2025 09:34:27 +0000 Subject: [PATCH 1/2] Require inspect_ai >= 0.3.57 for public trace_* functions. --- poetry.lock | 12 ++++++------ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/poetry.lock b/poetry.lock index e4feb33..ff860a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiobotocore" @@ -896,13 +896,13 @@ files = [ [[package]] name = "inspect-ai" -version = "0.3.55" +version = "0.3.57" description = "Framework for large language model evaluations" optional = false python-versions = ">=3.10" files = [ - {file = "inspect_ai-0.3.55-py3-none-any.whl", hash = "sha256:7ba965fda44fdd064d032486f9a0c2bf2f15f47b597ea9478363ce07c476edc2"}, - {file = "inspect_ai-0.3.55.tar.gz", hash = "sha256:9efe23c392b22909d9b8c0f9a37fdd46a7895fe43731e02530434c262e79b00c"}, + {file = "inspect_ai-0.3.57-py3-none-any.whl", hash = "sha256:2dd77e460ee05e2be3be10eaf9fa87c45e2b683e1daf88c5c839c8500f8a1ac1"}, + {file = "inspect_ai-0.3.57.tar.gz", hash = "sha256:cad47d13c53a60e2f9d6b5877dac127eec069b564cb6b2a34ea16413b66ca81e"}, ] [package.dependencies] @@ -936,7 +936,7 @@ typing_extensions = ">=4.9.0" zipp = ">=3.19.1" [package.extras] -dev = ["aioboto3", "anthropic", "azure-ai-inference", "google-cloud-aiplatform", "google-generativeai", "groq", "ipython", "mistralai", "moto[server]", "mypy", "nbformat", "openai", "pre-commit", "pytest", "pytest-asyncio", "pytest-cov", "pytest-dotenv", "pytest-xdist", "ruff (==0.8.4)", "textual-dev (>=0.86.2)", "types-PyYAML", "types-aioboto3", "types-beautifulsoup4", "types-boto3", "types-botocore", "types-jsonpatch", "types-jsonschema", "types-protobuf", "types-psutil", "types-python-dateutil"] +dev = ["aioboto3", "anthropic", "azure-ai-inference", "google-cloud-aiplatform", "google-generativeai", "groq", "ipython", "mistralai", "moto[server]", "mypy", "nbformat", "openai", "pre-commit", "pytest", "pytest-asyncio", "pytest-cov", "pytest-dotenv", "pytest-xdist", "ruff (==0.9.0)", "textual-dev (>=0.86.2)", "types-PyYAML", "types-aioboto3", "types-beautifulsoup4", "types-boto3", "types-botocore", "types-jsonpatch", "types-jsonschema", "types-protobuf", "types-psutil", "types-python-dateutil"] dist = ["build", "twine"] doc = ["jupyter", "quarto-cli"] @@ -2665,4 +2665,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "08daa34659a128b65f2bbd42ab40bbcf52fb31951ca35801f6acb0043e80ffdc" +content-hash = "387074bf8d82bfb7b38349f670066bf2ea7c7ab18aaa358198dfd6b72b7e9e6c" diff --git a/pyproject.toml b/pyproject.toml index 672bf8b..e9b6f1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ packages = [ [tool.poetry.dependencies] python = "^3.10" -inspect-ai = ">=0.3.54" +inspect-ai = ">=0.3.57" kubernetes = "^31.0.0" [tool.poetry.group.dev.dependencies] From 0a0cd6ba0a00a7b136c3eb215c608646804730c7 Mon Sep 17 00:00:00 2001 From: "Craig.Walton" Date: Fri, 10 Jan 2025 09:35:48 +0000 Subject: [PATCH 2/2] Use public trace_action and trace_message functions now that they're exported in inspect_ai.util. --- src/k8s_sandbox/_logger.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/k8s_sandbox/_logger.py b/src/k8s_sandbox/_logger.py index 77bf1ea..b2a8e2b 100644 --- a/src/k8s_sandbox/_logger.py +++ b/src/k8s_sandbox/_logger.py @@ -4,8 +4,7 @@ from contextlib import contextmanager from typing import Any, Generator -# TODO: Accessing private functions. To be made public by Inspect. -from inspect_ai._util.trace import trace_action, trace_message +from inspect_ai.util import trace_action, trace_message logger = logging.getLogger(__name__)