Skip to content

hotfix(medcat): Disable config train at load time#553

Merged
mart-r merged 3 commits into
mainfrom
hotfix/medcat/disable-config-train-at-load-time
Jun 18, 2026
Merged

hotfix(medcat): Disable config train at load time#553
mart-r merged 3 commits into
mainfrom
hotfix/medcat/disable-config-train-at-load-time

Conversation

@mart-r

@mart-r mart-r commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

This PR sets config.components.linking.train to False at load time.

Some models may have been saved with this set to True. And as of v2.8 (specifically #414) this can cause issues since that method of running training is no longer used.

There's also an added test that makes sure the loaded model has this config option disabled. (NOTE: the model that's in the repo has this problem so the test previously set this to False itself, but I've now removed this from the test class setup).

I also checked that this test fails in the main branch (i.e without the change from the first commit).

PS:
Just to be clear, this has to do with the config option that was previously used for self-supervised training. The process was to set *.train = True and run inference and then the vocab based linker would perform training within the inference step. The expected new approach is more explicit and does not use this config option. So all models can still be trained - both unsupervised and supervised.

@tomolopolis tomolopolis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

Comment thread medcat-v2/medcat/cat.py Outdated
@mart-r mart-r merged commit 977bdc0 into main Jun 18, 2026
20 checks passed
@mart-r mart-r deleted the hotfix/medcat/disable-config-train-at-load-time branch June 18, 2026 15:50
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.

3 participants