inspect-ai 0.3.66__py3-none-any.whl → 0.3.68__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.
Files changed (48) hide show
  1. inspect_ai/_display/core/config.py +1 -1
  2. inspect_ai/_display/core/panel.py +1 -2
  3. inspect_ai/_display/rich/display.py +2 -2
  4. inspect_ai/_display/textual/app.py +13 -5
  5. inspect_ai/_display/textual/widgets/footer.py +2 -2
  6. inspect_ai/_display/textual/widgets/sandbox.py +1 -1
  7. inspect_ai/_display/textual/widgets/task_detail.py +7 -5
  8. inspect_ai/_display/textual/widgets/tasks.py +8 -6
  9. inspect_ai/_display/textual/widgets/transcript.py +1 -1
  10. inspect_ai/_eval/task/run.py +5 -3
  11. inspect_ai/_eval/task/task.py +9 -1
  12. inspect_ai/_util/format.py +58 -0
  13. inspect_ai/_view/www/dist/assets/index.css +29 -9
  14. inspect_ai/_view/www/dist/assets/index.js +368 -304
  15. inspect_ai/_view/www/src/samples/error/FlatSampleErrorView.tsx +1 -1
  16. inspect_ai/_view/www/src/samples/sample-tools/filters.ts +41 -20
  17. inspect_ai/_view/www/src/samples/sample-tools/sample-filter/SampleFilter.tsx +2 -1
  18. inspect_ai/_view/www/src/samples/sample-tools/sample-filter/completions.ts +28 -6
  19. inspect_ai/_view/www/src/samples/sample-tools/sample-filter/language.ts +5 -0
  20. inspect_ai/_view/www/src/samples/transcript/LoggerEventView.tsx +1 -3
  21. inspect_ai/_view/www/src/samples/transcript/SubtaskEventView.tsx +31 -16
  22. inspect_ai/_view/www/src/samples/transcript/TranscriptView.tsx +4 -1
  23. inspect_ai/_view/www/src/workspace/navbar/StatusPanel.module.css +1 -0
  24. inspect_ai/_view/www/src/workspace/navbar/StatusPanel.tsx +2 -2
  25. inspect_ai/model/_model.py +89 -2
  26. inspect_ai/model/_providers/anthropic.py +4 -0
  27. inspect_ai/model/_providers/azureai.py +5 -0
  28. inspect_ai/model/_providers/bedrock.py +5 -0
  29. inspect_ai/model/_providers/cloudflare.py +4 -0
  30. inspect_ai/model/_providers/goodfire.py +5 -0
  31. inspect_ai/model/_providers/google.py +16 -3
  32. inspect_ai/model/_providers/groq.py +4 -0
  33. inspect_ai/model/_providers/hf.py +7 -0
  34. inspect_ai/model/_providers/mistral.py +4 -0
  35. inspect_ai/model/_providers/openai.py +4 -0
  36. inspect_ai/model/_providers/vertex.py +5 -0
  37. inspect_ai/model/_providers/vllm.py +7 -0
  38. inspect_ai/solver/__init__.py +8 -1
  39. inspect_ai/solver/_human_agent/panel.py +11 -5
  40. inspect_ai/solver/_prompt.py +38 -5
  41. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/METADATA +3 -2
  42. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/RECORD +46 -48
  43. inspect_ai/_view/www/node_modules/flatted/python/flatted.py +0 -149
  44. inspect_ai/_view/www/node_modules/flatted/python/test.py +0 -63
  45. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/LICENSE +0 -0
  46. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/WHEEL +0 -0
  47. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/entry_points.txt +0 -0
  48. {inspect_ai-0.3.66.dist-info → inspect_ai-0.3.68.dist-info}/top_level.txt +0 -0
@@ -1,63 +0,0 @@
1
- from flatted import stringify as _stringify, parse
2
-
3
- def stringify(value):
4
- return _stringify(value, separators=(',', ':'))
5
-
6
- assert stringify([None, None]) == '[[null,null]]'
7
-
8
- a = []
9
- o = {}
10
-
11
- assert stringify(a) == '[[]]'
12
- assert stringify(o) == '[{}]'
13
-
14
- a.append(a)
15
- o['o'] = o
16
-
17
- assert stringify(a) == '[["0"]]'
18
- assert stringify(o) == '[{"o":"0"}]'
19
-
20
- b = parse(stringify(a))
21
- assert isinstance(b, list) and b[0] == b
22
-
23
- a.append(1)
24
- a.append('two')
25
- a.append(True)
26
- o['one'] = 1
27
- o['two'] = 'two'
28
- o['three'] = True
29
-
30
- assert stringify(a) == '[["0",1,"1",true],"two"]'
31
- assert stringify(o) == '[{"o":"0","one":1,"two":"1","three":true},"two"]'
32
-
33
- a.append(o)
34
- o['a'] = a
35
-
36
- assert stringify(a) == '[["0",1,"1",true,"2"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0"}]'
37
- assert stringify(o) == '[{"o":"0","one":1,"two":"1","three":true,"a":"2"},"two",["2",1,"1",true,"0"]]'
38
-
39
- a.append({'test': 'OK'})
40
- a.append([1, 2, 3])
41
-
42
- o['test'] = {'test': 'OK'}
43
- o['array'] = [1, 2, 3]
44
-
45
- assert stringify(a) == '[["0",1,"1",true,"2","3","4"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0","test":"3","array":"4"},{"test":"5"},[1,2,3],"OK"]'
46
- assert stringify(o) == '[{"o":"0","one":1,"two":"1","three":true,"a":"2","test":"3","array":"4"},"two",["2",1,"1",true,"0","3","4"],{"test":"5"},[1,2,3],"OK"]'
47
-
48
- a2 = parse(stringify(a));
49
- o2 = parse(stringify(o));
50
-
51
- assert a2[0] == a2
52
- assert o2['o'] == o2
53
-
54
- assert a2[1] == 1 and a2[2] == 'two' and a2[3] == True and isinstance(a2[4], dict)
55
- assert a2[4] == a2[4]['o'] and a2 == a2[4]['o']['a']
56
-
57
- str = parse('[{"prop":"1","a":"2","b":"3"},{"value":123},["4","5"],{"e":"6","t":"7","p":4},{},{"b":"8"},"f",{"a":"9"},["10"],"sup",{"a":1,"d":2,"c":"7","z":"11","h":1},{"g":2,"a":"7","b":"12","f":6},{"r":4,"u":"7","c":5}]')
58
- assert str['b']['t']['a'] == 'sup' and str['a'][1]['b'][0]['c'] == str['b']['t']
59
-
60
- oo = parse('[{"a":"1","b":"0","c":"2"},{"aa":"3"},{"ca":"4","cb":"5","cc":"6","cd":"7","ce":"8","cf":"9"},{"aaa":"10"},{"caa":"4"},{"cba":"5"},{"cca":"2"},{"cda":"4"},"value2","value3","value1"]');
61
- assert oo['a']['aa']['aaa'] == 'value1' and oo == oo['b'] and oo['c']['ca']['caa'] == oo['c']['ca']
62
-
63
- print('OK')