Skip to content

Add py.typed for type hints#760

Open
UFO-101 wants to merge 7 commits intoTransformerLensOrg:devfrom
UFO-101:pytyped
Open

Add py.typed for type hints#760
UFO-101 wants to merge 7 commits intoTransformerLensOrg:devfrom
UFO-101:pytyped

Conversation

@UFO-101
Copy link
Contributor

@UFO-101 UFO-101 commented Oct 18, 2024

Description

I think that all libraries are supposed to include a py.typed file for types to be accessible to external users. See: https://blog.whtsky.me/tech/2021/dont-forget-py.typed-for-your-typed-python-package/.

However, I haven't researched this thoroughly, so someone should probably look into this a bit more.

Type of change

  • New feature (non-breaking change which adds functionality)

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

…and adjust the cross entropy calculation to ignore masked (padding) tokens.
@UFO-101
Copy link
Contributor Author

UFO-101 commented Jan 11, 2025

Bump @bryce13950

@bryce13950
Copy link
Collaborator

Sorry for the delay on getting this in, and thanks for bumping me. I updated it to the most recent version of TransformerLens, and that seems to have caused some issues. I am thinking of rolling this into 3.0. The issues that came up, I believe will already be fixed in dev-3.x. If you are fine with that, I will update the merge point to dev-3.x and work this into 3.0

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