Skip to content

Conversation

@breuleux
Copy link
Member

@breuleux breuleux commented Feb 9, 2026

Scraping is failing in ParsedResponseSerializer.load because of issues with deserializing to JSON type.

@breuleux breuleux merged commit 41453a4 into mila-iqia:v3 Feb 9, 2026
1 of 2 checks passed
Comment on lines -112 to +120
response = serieux.deserialize(
serieux.Comment[serieux.JSON, metadata_type], data
response: types.GenerateContentResponse = (
types.GenerateContentResponse.model_validate(data)
)
response: types.GenerateContentResponse = CommentProxy(
types.GenerateContentResponse.model_validate(response), response._
)
# response.parsed is reset to a generic Pydantic BaseModel. Restore the
# parsed value.
response.parsed = data["parsed"]

comment = serieux.deserialize(metadata_type, comment)
response = CommentProxy(response, comment)
response.parsed = comment.parsed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only serieux.deserialize needs to be protected by with SERIEUX_LOCK: but it's not such a big deal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants