Skip to content

Conversation

kochkov92
Copy link
Contributor

Previously np_adapter.get_array_summary would return str repre, but with recent treescope updates it returns Siblings object. This PR simply extracts text entries from Siblings to mimic the old test.

@kochkov92
Copy link
Contributor Author

@danieldjohnson - do you think this would work?
I'd love to be able to run latests versions of treescope & penzai together (without disabling some tests).

@danieldjohnson
Copy link
Collaborator

Thanks for catching this, and sorry for the late response!

Would you mind changing it to instead use treescope.lowering.render_to_text_as_root to convert it to string instead of parsing the Siblings object manually? This should be more robust to future changes.

Also, FYI, there is an issue with the Penzai and Treescope PyPI packages that is preventing me from making new releases at the moment, so it might take some time before I am able to get this change into a release.

@kochkov92 kochkov92 force-pushed the compatibility_with_treescope_update branch from efb1932 to 8277b87 Compare April 1, 2025 23:53
@kochkov92 kochkov92 force-pushed the compatibility_with_treescope_update branch from 8277b87 to 993d1b1 Compare April 1, 2025 23:54
@kochkov92
Copy link
Contributor Author

Nice - I was searching for this functionality within treescope but failed to quickly find it last time. Thanks for pointing it out!

@danieldjohnson danieldjohnson merged commit cdeac4f into google-deepmind:main Apr 8, 2025
2 checks passed
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