inspect-ai 0.3.12__py3-none-any.whl → 0.13.3__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/_view/www/App.mjs +19 -7
- inspect_ai/_view/www/src/samples/SamplesTab.mjs +1 -1
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/METADATA +1 -1
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/RECORD +8 -8
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/LICENSE +0 -0
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/WHEEL +0 -0
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/entry_points.txt +0 -0
- {inspect_ai-0.3.12.dist-info → inspect_ai-0.13.3.dist-info}/top_level.txt +0 -0
inspect_ai/_view/www/App.mjs
CHANGED
@@ -20,6 +20,7 @@ import { WorkSpace } from "./src/workspace/WorkSpace.mjs";
|
|
20
20
|
|
21
21
|
export function App() {
|
22
22
|
const [selected, setSelected] = useState(-1);
|
23
|
+
const [pendingLog, setPendingLog] = useState(undefined);
|
23
24
|
const [logs, setLogs] = useState({ log_dir: "", files: [] });
|
24
25
|
const [logHeaders, setLogHeaders] = useState({});
|
25
26
|
const [offcanvas, setOffcanvas] = useState(false);
|
@@ -126,24 +127,32 @@ export function App() {
|
|
126
127
|
// Ensure that we have a selected index when there is are
|
127
128
|
// new logs
|
128
129
|
useEffect(() => {
|
129
|
-
|
130
|
-
|
130
|
+
if (logs && pendingLog) {
|
131
|
+
const index = logs.files.findIndex((val) => {
|
132
|
+
return pendingLog.endsWith(val.name);
|
133
|
+
});
|
134
|
+
if (index > -1) {
|
135
|
+
setSelected(index);
|
136
|
+
}
|
137
|
+
setPendingLog(undefined);
|
138
|
+
}
|
139
|
+
}, [logs, pendingLog])
|
131
140
|
|
132
141
|
// listen for updateState messages from vscode
|
133
142
|
useEffect(() => {
|
134
|
-
const onMessage = (e) => {
|
143
|
+
const onMessage = async (e) => {
|
135
144
|
switch (e.data.type || e.data.message) {
|
136
145
|
case "updateState": {
|
137
146
|
if (e.data.url) {
|
138
|
-
|
139
147
|
const index = logs.files.findIndex((val) => {
|
140
|
-
return
|
148
|
+
return e.data.url.endsWith(val.name);
|
141
149
|
});
|
142
150
|
if (index > -1) {
|
143
151
|
// Select the correct index
|
144
152
|
setSelected(index);
|
145
153
|
} else {
|
146
|
-
|
154
|
+
await loadLogs();
|
155
|
+
setPendingLog(e.data.url);
|
147
156
|
}
|
148
157
|
}
|
149
158
|
}
|
@@ -153,7 +162,7 @@ export function App() {
|
|
153
162
|
return () => {
|
154
163
|
window.removeEventListener("message", onMessage);
|
155
164
|
};
|
156
|
-
}, [setCurrentLog]);
|
165
|
+
}, [logs, setCurrentLog, setPendingLog]);
|
157
166
|
|
158
167
|
useEffect(async () => {
|
159
168
|
// See whether a specific task_file has been passed.
|
@@ -176,6 +185,9 @@ export function App() {
|
|
176
185
|
// initial fetch of logs
|
177
186
|
await load();
|
178
187
|
|
188
|
+
// Select the first log
|
189
|
+
setSelected(0);
|
190
|
+
|
179
191
|
// poll every 1s for events
|
180
192
|
setInterval(() => {
|
181
193
|
api.client_events().then((events) => {
|
@@ -54,7 +54,7 @@ inspect_ai/_view/schema.py,sha256=SlBJ75EsCjEtSzcVMuP2yu2cI3ju1Z3amUWaWbqNZjM,14
|
|
54
54
|
inspect_ai/_view/view.py,sha256=Gm2p5A8dvwFM2NWkz8GPF7pqSmcC4X1dtXxPvkw0Q_M,9624
|
55
55
|
inspect_ai/_view/www/.gitignore,sha256=8amgmyJs-OmKQoYgDF2evVwokkcHrDMXlH-OzwarFns,13
|
56
56
|
inspect_ai/_view/www/App.css,sha256=VZtFGBwW_JsKtiC4WY0lLT-mcOlGYdxRvqm1-KyeSyQ,13934
|
57
|
-
inspect_ai/_view/www/App.mjs,sha256=
|
57
|
+
inspect_ai/_view/www/App.mjs,sha256=yEyCPMSH-wu7YMeNRTaZbdaSW3pvYYR_dF7jO_lQHWM,7605
|
58
58
|
inspect_ai/_view/www/favicon.svg,sha256=b9AHYZaO2zBzeKH6G4PwXZMGGW_UxY0omKHam-c9MAs,1508
|
59
59
|
inspect_ai/_view/www/index.html,sha256=HEUzotuCnX5GClv4feeppOhNrPN6CxXqp4N_Nsyp7oo,2158
|
60
60
|
inspect_ai/_view/www/log-schema.json,sha256=pGcQiJEUqdzfsxKDqc-eEfRHXaP_FAVbWpUahpWaf9g,38118
|
@@ -115,7 +115,7 @@ inspect_ai/_view/www/src/samples/SampleDisplay.mjs,sha256=KZZB2YZkoSPDKK5facTwrl
|
|
115
115
|
inspect_ai/_view/www/src/samples/SampleList.mjs,sha256=05TDU3dZFF1AOXDdtnddSNS6Y0qJDFtexFiDy4GnO-M,6598
|
116
116
|
inspect_ai/_view/www/src/samples/SampleScoreView.mjs,sha256=Pm3rAV-W2dJ56aFxaxWD7ooaVJMbbSsTPe113wfFOPM,2989
|
117
117
|
inspect_ai/_view/www/src/samples/SamplesDescriptor.mjs,sha256=itfKTMAds_Y7cLjFJqzs--j3x28dlSH_3oW1QhbZxeQ,7754
|
118
|
-
inspect_ai/_view/www/src/samples/SamplesTab.mjs,sha256=
|
118
|
+
inspect_ai/_view/www/src/samples/SamplesTab.mjs,sha256=XSONY82wL02cyz9jye5osaJyd1U55zMvYA4mRK89Spg,8529
|
119
119
|
inspect_ai/_view/www/src/samples/SamplesTools.mjs,sha256=A9qHXdMmFAfhGP2ceMxbmyWJBhWVKbi3qfNM3gGPDR0,854
|
120
120
|
inspect_ai/_view/www/src/samples/tools/EpochFilter.mjs,sha256=FMWN67tPNcWTtqd8qPbaFWtsBBzP9013ZhFCfGsajNQ,775
|
121
121
|
inspect_ai/_view/www/src/samples/tools/SampleFilter.mjs,sha256=f1FZBuhuFB_HUD4HoEASoY1cY4GUHIa0ZK9cAV_Hz4w,4834
|
@@ -196,9 +196,9 @@ inspect_ai/util/_context/concurrency.py,sha256=v5G57onvFRf2lktkPoNJavOBkheqrAglD
|
|
196
196
|
inspect_ai/util/_context/logger.py,sha256=SODT-AQT-UcFzcRbjsrD0XWawoAF1nIKvgZ5LGqJOEs,690
|
197
197
|
inspect_ai/util/_context/resource.py,sha256=6CDOos4izeGWfFh8Jq3BvonrsuH69JMXLtyAr7aUskE,3148
|
198
198
|
inspect_ai/util/_context/subprocess.py,sha256=Md_1_tShPxMBFUEzNIJCOT8JJaNLFxKsfw1GeDp3CrU,4734
|
199
|
-
inspect_ai-0.3.
|
200
|
-
inspect_ai-0.3.
|
201
|
-
inspect_ai-0.3.
|
202
|
-
inspect_ai-0.3.
|
203
|
-
inspect_ai-0.3.
|
204
|
-
inspect_ai-0.3.
|
199
|
+
inspect_ai-0.13.3.dist-info/LICENSE,sha256=aYPffOl9TwBXDQ8g33Jh6AsBhobb3A76qNm7r2HZsps,1079
|
200
|
+
inspect_ai-0.13.3.dist-info/METADATA,sha256=pclK1FtHKH1NR932xWpnfeDZk04qD0hYigH2FJebvu0,4185
|
201
|
+
inspect_ai-0.13.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
202
|
+
inspect_ai-0.13.3.dist-info/entry_points.txt,sha256=WGGLmzTzDWLzYfiyovSY6oEKuf-gqzSDNOb5V-hk3fM,54
|
203
|
+
inspect_ai-0.13.3.dist-info/top_level.txt,sha256=Tp3za30CHXJEKLk8xLe9qGsW4pBzJpEIOMHOHNCXiVo,11
|
204
|
+
inspect_ai-0.13.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|