Skip to content
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

Remove node-hyperlink and copypaste-fallback support, tweak path copying. #68

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

copybara-service[bot]
Copy link

Remove node-hyperlink and copypaste-fallback support, tweak path copying.

Removes two complex features in Treescope which were only rarely used:

  • Node hyperlinks: Previously, tree nodes could link to each other by path. However, this
    added complexity to every rendering and is unused in the v2 Penzai neural network design.
  • Copypaste fallbacks: To try to ensure Treescope renderings were valid Python syntax even
    for unrecognized types, custom repr implementations were originally wrapped in a
    "NotRoundtrippable" wrapper in roundtrip mode. However, this was only partially supported
    and cannot be guaranteed now that types can define their own Treescope handlers. Penzai
    models are still roundtrippable if they don't have array data.

Also changes the "Copy path" buttons to be less verbose, by removing the "(lambda root: root...)"
boilerplate.

…ing.

Removes two complex features in Treescope which were only rarely used:

- Node hyperlinks: Previously, tree nodes could link to each other by path. However, this
  added complexity to every rendering and is unused in the v2 Penzai neural network design.
- Copypaste fallbacks: To try to ensure Treescope renderings were valid Python syntax even
  for unrecognized types, custom `repr` implementations were originally wrapped in a
  "NotRoundtrippable" wrapper in roundtrip mode. However, this was only partially supported
  and cannot be guaranteed now that types can define their own Treescope handlers. Penzai
  models are still roundtrippable if they don't have array data.

Also changes the "Copy path" buttons to be less verbose, by removing the "(lambda root: root...)"
boilerplate.

PiperOrigin-RevId: 653597261
@copybara-service copybara-service bot merged commit 2b7d0f3 into main Jul 18, 2024
@copybara-service copybara-service bot deleted the test_651758769 branch July 18, 2024 13:30
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.

1 participant