feat: setting up sae_lens package and auto-deploy with semantic-release #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR renames the package to
sae-lens
to ready it for publication on PyPI. All imports are now fromsae_lens
. Thesae_training
andsae_analysis
packages are now accessed atsae_lens.training
andsae_lens.analysis
, respectively. The most commonly imported items from thetraining
package are also exported at the top-level, so it's possible to runfrom sae_lens import SparseAutoencoder
, for example.In addition, this PR sets up the library to auto-deploy on commit to main based on semantic-release. This means that the commit message to main will determine how the version is bumped in a deploy, or whether a deploy happens at all. For example, the following commit messages will bump the version number as follows:
chore: updating docs
no version bumpfix: the main class no longer errors on osx
patch version bump (1.2.3 -> 1.2.4)feat: added a new function
minor version bump (1.2.3 -> 1.3.0)feat: redid everything BREAKING CHANGE: everything is different
major version bump (1.2.3 -> 2.0.0)I tried to update all the docs and jupyter notebooks to reflect the new import pattern, but it's possible I missed something somewhere.
This PR adds a custom unpickler method so that currently existing pickled SAEs on huggingface can still be loaded with
torch.load()
in the session loader.closes #10