Skip to content

Conversation

@BorisTheBrave
Copy link
Contributor

Description

Improves docs.

  1. Fix some formatting in get_act_name
  2. Fix a broken link
  3. Show special methods getitem iter and len (which are relevant to ActivationCache).
  4. Improve phrasing of ActivationCache.getitem docs

Type of change

Please delete options that are not relevant.

  • This change requires a documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

image image

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@BorisTheBrave BorisTheBrave force-pushed the improve-activationcache-docs branch from fac7c90 to 5839c48 Compare March 26, 2025 23:38
The :class:`ActivationCache` is at the core of Transformer Lens. It is a wrapper that stores all
important activations from a forward pass of the model, and provides a variety of helper
functions to investigate them. The common way to access it is to run the model with
:meth:`transformer_lens.HookedTransformer.run_with_cache`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like it was changed in error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. I don't understand why, but for me this fixed a broken link generation. We can omit from he PR if you are unsure

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm I'll check before we move on it. It is very bizarre that it would have been a link issue before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. It's currently broken on the website
    image

You ahve a module called HookedTransformer. Hence why HookedTransformer is repeated, to reference the class inside the module.

@bryce13950 bryce13950 merged commit 7158846 into TransformerLensOrg:dev Jun 10, 2025
10 of 11 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