inspect-ai 0.3.54__py3-none-any.whl → 0.3.55__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- inspect_ai/_eval/task/log.py +2 -1
- inspect_ai/model/_cache.py +1 -1
- inspect_ai/model/_providers/openai.py +11 -1
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/METADATA +2 -2
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/RECORD +9 -9
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/LICENSE +0 -0
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/WHEEL +0 -0
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.54.dist-info → inspect_ai-0.3.55.dist-info}/top_level.txt +0 -0
inspect_ai/_eval/task/log.py
CHANGED
@@ -69,10 +69,11 @@ class TaskLogger:
|
|
69
69
|
)
|
70
70
|
packages = {PKG_NAME: importlib_metadata.version(PKG_NAME)}
|
71
71
|
|
72
|
-
#
|
72
|
+
# redact authentication oriented model_args
|
73
73
|
model_args = model_args.copy()
|
74
74
|
if "api_key" in model_args:
|
75
75
|
del model_args["api_key"]
|
76
|
+
model_args = {k: v for k, v in model_args.items() if not k.startswith("aws_")}
|
76
77
|
|
77
78
|
# cwd_relative_path for sandbox config
|
78
79
|
if sandbox and isinstance(sandbox.config, str):
|
inspect_ai/model/_cache.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import json
|
2
2
|
import os
|
3
|
+
from logging import getLogger
|
3
4
|
from typing import Any
|
4
5
|
|
5
6
|
from openai import (
|
@@ -36,6 +37,7 @@ from inspect_ai._util.constants import DEFAULT_MAX_RETRIES
|
|
36
37
|
from inspect_ai._util.content import Content
|
37
38
|
from inspect_ai._util.error import PrerequisiteError
|
38
39
|
from inspect_ai._util.images import image_as_data_uri
|
40
|
+
from inspect_ai._util.logger import warn_once
|
39
41
|
from inspect_ai._util.url import is_data_uri, is_http_url
|
40
42
|
from inspect_ai.tool import ToolCall, ToolChoice, ToolFunction, ToolInfo
|
41
43
|
|
@@ -58,6 +60,8 @@ from .util import (
|
|
58
60
|
parse_tool_call,
|
59
61
|
)
|
60
62
|
|
63
|
+
logger = getLogger(__name__)
|
64
|
+
|
61
65
|
OPENAI_API_KEY = "OPENAI_API_KEY"
|
62
66
|
AZURE_OPENAI_API_KEY = "AZURE_OPENAI_API_KEY"
|
63
67
|
AZUREAI_OPENAI_API_KEY = "AZUREAI_OPENAI_API_KEY"
|
@@ -270,7 +274,13 @@ class OpenAIAPI(ModelAPI):
|
|
270
274
|
if config.seed is not None:
|
271
275
|
params["seed"] = config.seed
|
272
276
|
if config.temperature is not None:
|
273
|
-
|
277
|
+
if self.is_o1():
|
278
|
+
warn_once(
|
279
|
+
logger,
|
280
|
+
"o1 models do not support the 'temperature' parameter (temperature is always 1).",
|
281
|
+
)
|
282
|
+
else:
|
283
|
+
params["temperature"] = config.temperature
|
274
284
|
# TogetherAPI requires temperature w/ num_choices
|
275
285
|
elif config.num_choices is not None:
|
276
286
|
params["temperature"] = 1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: inspect_ai
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.55
|
4
4
|
Summary: Framework for large language model evaluations
|
5
5
|
Author: UK AI Safety Institute
|
6
6
|
License: MIT License
|
@@ -67,7 +67,7 @@ Requires-Dist: pytest-asyncio; extra == "dev"
|
|
67
67
|
Requires-Dist: pytest-cov; extra == "dev"
|
68
68
|
Requires-Dist: pytest-dotenv; extra == "dev"
|
69
69
|
Requires-Dist: pytest-xdist; extra == "dev"
|
70
|
-
Requires-Dist: ruff==0.8.
|
70
|
+
Requires-Dist: ruff==0.8.4; extra == "dev"
|
71
71
|
Requires-Dist: textual-dev>=0.86.2; extra == "dev"
|
72
72
|
Requires-Dist: types-PyYAML; extra == "dev"
|
73
73
|
Requires-Dist: types-beautifulsoup4; extra == "dev"
|
@@ -53,7 +53,7 @@ inspect_ai/_eval/task/epochs.py,sha256=Ci7T6CQniSOTChv5Im2dCdSDrP-5hq19rV6iJ2uBc
|
|
53
53
|
inspect_ai/_eval/task/error.py,sha256=gJnd8X7LHpPz5zcOq_az6ONZICGJ0_VpSz9yhF0yRyY,1233
|
54
54
|
inspect_ai/_eval/task/generate.py,sha256=Edm-_6Wp1mkb7XpGkfTAqobWPfjJeWB0sb8-76UjNrc,1999
|
55
55
|
inspect_ai/_eval/task/images.py,sha256=Bg3TpDlTsW-pucpZP-6dMkO3W-TFz2lZjHzdzX5qnZ4,3236
|
56
|
-
inspect_ai/_eval/task/log.py,sha256=
|
56
|
+
inspect_ai/_eval/task/log.py,sha256=TjyLglP-3gMMDkfmxYbsxTvGIWY9FEyVtB09Fyrm_PA,6166
|
57
57
|
inspect_ai/_eval/task/results.py,sha256=vJADjZaK38fRZ1kLRBby46tVk2qzah40VH34QnmCJXM,14482
|
58
58
|
inspect_ai/_eval/task/run.py,sha256=24v9T0KulP1I7WZOlJemOclyFYos9qboK3KLdhkeVkI,31880
|
59
59
|
inspect_ai/_eval/task/rundir.py,sha256=QXetLfqi1lRo-PcIuu7maQpVO57c2ebnsjfZk0lsAFk,2001
|
@@ -288,7 +288,7 @@ inspect_ai/log/_recorders/file.py,sha256=bY0fCr4_gWgLG0g2lYgts7wJYxaiKFdKEz3csu9
|
|
288
288
|
inspect_ai/log/_recorders/json.py,sha256=l8I1YAsjnD0fuOYV_KVIWciOCBO6FYgVVkour78_jDI,8980
|
289
289
|
inspect_ai/log/_recorders/recorder.py,sha256=yvW_D99QxUQmnF5EiGsWIVetBXdssMUcsq5us9oRzx4,1551
|
290
290
|
inspect_ai/model/__init__.py,sha256=mBs6hmdWu6KhTQCXFh_NHrCw9oQ9-mn6wDLTDqjguN8,2028
|
291
|
-
inspect_ai/model/_cache.py,sha256=
|
291
|
+
inspect_ai/model/_cache.py,sha256=IQXhMas58Pjdma894GHGTtHYpmnf_Ojz_eE0kHaQVPs,13567
|
292
292
|
inspect_ai/model/_call_tools.py,sha256=qQ-vXDdX5F4M4GY2iF2zPiIMt_9VJ8llOfATm8P8JI8,13755
|
293
293
|
inspect_ai/model/_chat_message.py,sha256=Zc2hHMLbWONuhLx-XYPOekDD20mF4uTU62WRTsry3c4,4355
|
294
294
|
inspect_ai/model/_generate_config.py,sha256=FtZz1MtD8BA48qeOzQpKmTlq4txLktnSN6Q8ItXHfGA,8724
|
@@ -311,7 +311,7 @@ inspect_ai/model/_providers/llama_cpp_python.py,sha256=i2I56Damgb8VDhMuPxPca24fV
|
|
311
311
|
inspect_ai/model/_providers/mistral.py,sha256=IXiPehZKiUbbAb13CGOFRpCyyn01pcxHUcluV_1OdMA,15128
|
312
312
|
inspect_ai/model/_providers/mockllm.py,sha256=gL9f-f5TOdE4a0GVENr3cOIIp2kv8zVXWPZ608rouGk,2440
|
313
313
|
inspect_ai/model/_providers/ollama.py,sha256=mBPSxaEkiH_RnlHKqOyFBlXObQhc2dfjL-rCKrea5u8,675
|
314
|
-
inspect_ai/model/_providers/openai.py,sha256=
|
314
|
+
inspect_ai/model/_providers/openai.py,sha256=cU8KWkWiob8bsXkPxb0LCLTOrtresUrheaigxpIPAJM,16263
|
315
315
|
inspect_ai/model/_providers/openai_o1.py,sha256=vRjX-iTP0IyUb_0hiRY0YXjoyRpSkbZw6v4lvZxcJVw,12234
|
316
316
|
inspect_ai/model/_providers/providers.py,sha256=IZn7gn993LJQ-EmN6ZhA68-CMgaeUmhQGEMRasazvL4,5631
|
317
317
|
inspect_ai/model/_providers/together.py,sha256=9GKN--wCRQ2pT9x0mIq7hSOFV1OM-Ps6JwJ1Rj26GEM,9468
|
@@ -409,9 +409,9 @@ inspect_ai/util/_sandbox/docker/docker.py,sha256=51nL7d3Y2hbSpxIcbYdfJ68wvgaepSo
|
|
409
409
|
inspect_ai/util/_sandbox/docker/internal.py,sha256=pwK3xl-fx_5FVmVmvautE8R7op3XCjgiA-1JqlRcHII,1311
|
410
410
|
inspect_ai/util/_sandbox/docker/prereqs.py,sha256=LKWt2T5CJ8hZ25SFDGX9FTGXFAtHzvQoolOffjQKlm8,3341
|
411
411
|
inspect_ai/util/_sandbox/docker/util.py,sha256=QiWm7wxzsFyl6_ycZWJ16q6yU37iFAkJ-RAIALrkmF0,2691
|
412
|
-
inspect_ai-0.3.
|
413
|
-
inspect_ai-0.3.
|
414
|
-
inspect_ai-0.3.
|
415
|
-
inspect_ai-0.3.
|
416
|
-
inspect_ai-0.3.
|
417
|
-
inspect_ai-0.3.
|
412
|
+
inspect_ai-0.3.55.dist-info/LICENSE,sha256=aYPffOl9TwBXDQ8g33Jh6AsBhobb3A76qNm7r2HZsps,1079
|
413
|
+
inspect_ai-0.3.55.dist-info/METADATA,sha256=hv8bh8KunHUszjXDOoljHZ_RkaQAb1B885hs5nLKNFA,4488
|
414
|
+
inspect_ai-0.3.55.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
415
|
+
inspect_ai-0.3.55.dist-info/entry_points.txt,sha256=WGGLmzTzDWLzYfiyovSY6oEKuf-gqzSDNOb5V-hk3fM,54
|
416
|
+
inspect_ai-0.3.55.dist-info/top_level.txt,sha256=Tp3za30CHXJEKLk8xLe9qGsW4pBzJpEIOMHOHNCXiVo,11
|
417
|
+
inspect_ai-0.3.55.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|