Rename pretext to pretrain - #14
Merged
Merged
Conversation
The directory now matches what it is used for; module paths become spine.pretrain.*, including the config _target_ strings. Existing TransferCheckpoints store the old spine.pretext.* target as a string but never re-instantiate it (only backbone._target_ is read, for backbone detection), so previously trained encoders keep loading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Follows the package move: PretextTask -> PretrainTask, PretextDataset -> PretrainDataset, and the surrounding prose. This is a public API change -- downstream code importing PretextTask must be updated with it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Renames the pretext package and its identifiers so the naming matches how the
code is used.
src/spine/pretext/->src/spine/pretrain/, so module paths and the config_target_strings becomespine.pretrain.*PretextTask->PretrainTask,PretextDataset->PretrainDataset, and thesurrounding prose in docstrings, README and DESIGN
Existing checkpoints still load
Every TransferCheckpoint stores its task target as the string
spine.pretext.curtain.task.CurtainTask. Nothing re-instantiates that string --only
backbone._target_is read, for backbone detection -- so encoders trainedbefore this change keep loading unchanged. Verified against the current
IceCube encoders.
Breaking change for downstream branches
This changes the public API.
dev/unstable,gpt-domidandgraphnet-splitall import
PretextTask/spine.pretext.*and will need the same renameapplied when they merge or rebase.
dev/unstableadditionally carries modulesthat do not exist here (
spine/pretext/mpm/), so it is cleaner to re-apply therename there than to merge a diverged package tree.
Verification
Imported on a compute node against the project env:
spine.pretrain.base,spine.pretrain.curtain.task,spine.pretrain.curtain.objectives,spine.data.datamodule,spine.train,spine.ssl_moduleall resolve, and nooccurrence of "pretext" remains anywhere in the repo.
🤖 Generated with Claude Code