-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log viewer HTTP API does not support .eval
format
#1185
Comments
It does support eval files (we use them quite a bit) so there is likely something specific in your scenario that isn't being handled properly by the viewer. Can you say more about how to reproduce this? |
Sorry to be unclear. By the HTTP API of the viewer, I mean the stuff defined in api-http.mjs and index.mjs I'm passing in a URL to an
|
I'm familiar with that code. So you're just forming a url with a log file pointing to an eval file- I'll give that a try later today and report back. |
It's calling inspect_ai/src/inspect_ai/_view/www/src/utils/Json.mjs Lines 3 to 30 in 302893f
and throwing on
because the contents are not JSON. |
The fix might be as simple as using
I'm happy to take a crack at it if you'd like. If you could review #1184 first that would be helpful, so that I don't have to deal with potential merge conflicts. |
Yeah I think the question is why it is improperly treating the file as a json file rather than and eval file. |
Ah, so it's supposed to already detect |
Since the apis aren’t really aware of file type differences, the log_file url param shouldn’t be used inside the API to resolve log_paths. Instead, resolve it at the client level, if neeeded. Fixes #1185
Reasoning about the log file based upon the type happens one layer up in the |
It tries to parse the binary as JSON and raises:
The necessary changes are somewhere in api-http.mjs. (Note that I'm about to modify that file with #1184, so it would be best to make this change downstream from that.)
The text was updated successfully, but these errors were encountered: