Skip to content

fix(embedding-linker) optimizer, transformer config, and naming fixes#416

Merged
adam-sutton-1992 merged 13 commits intomainfrom
embedding_linker_bugfixes
Apr 24, 2026
Merged

fix(embedding-linker) optimizer, transformer config, and naming fixes#416
adam-sutton-1992 merged 13 commits intomainfrom
embedding_linker_bugfixes

Conversation

@adam-sutton-1992
Copy link
Copy Markdown
Contributor

Hihi,

Three fixes/changes in here for the most part.

  1. The embedding linker optimzer doesn't reset upon providing new models. Training would be difficult. So I expose a "load_transformers" to both static and trainable linkers. The trainable model does a bit more with reset_optimizer_and_scaler which points the optimzer to the right model. I also expose learning rate and weight decay, so they're config settings that can be set and changed here.
  2. The naming of the embedding linker was inconsistent. So I've set name to trainable_embedding_linker and the class name to Linker. To be consistent with previous design. This was an issue with creating new components and deserializing.
  3. With embed_cuis and embed_names being tucked away in the context_model, it didn't make sense to have the model being set there. Somewhat missed from just its static linking days.

Copy link
Copy Markdown
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

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

The logged comment looks odd in serialise_to - what it's describing doesn't seem to be happening.

Other than that, looks good.

@adam-sutton-1992
Copy link
Copy Markdown
Contributor Author

Fixed that doc issue - from the old embedding linker.

@adam-sutton-1992 adam-sutton-1992 merged commit 939d015 into main Apr 24, 2026
6 checks passed
@adam-sutton-1992 adam-sutton-1992 deleted the embedding_linker_bugfixes branch April 24, 2026 11:15
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