Closed lukasberglund closed 3 weeks ago
Yes, this should be a simple schema fix! Do you think it would be legit for us to covert the None
into an empty list? (just so that readers of the log can depend on having a list vs. having to check for None
).
This should be resolved with this commit: https://github.com/UKGovernmentBEIS/inspect_ai/commit/8141ef25f2eef2cb23c8ac8a4d2ee02872db6549 (I added None
to the schema for bytes
)
Sometimes, when I try to get top logprobs via the OpenAI API. I get the error pictured below. The issue seems to be that the OpenAI sometime returns a logprobs object for which the bytes field is
None
, e.g.{'token': '<|end|>', 'bytes': None, 'logprob': -28.681221},
, but pydantic expects the bytes field to be a list. I think this could be fixed by changing the type signature forLogProbs
in inspect, but I'm not sure. (I tried doing this and for some reason pydantic was still complaining, maybe I made some mistake though.)Here's the full log file