MedCAT icon indicating copy to clipboard operation
MedCAT copied to clipboard

CU-8694fwyje pre load config(s)

Open mart-r opened this issue 1 year ago • 3 comments

Separate config entries that only (truly) take effect if set before a model is loaded or initialised.

Some of these config entries are used elsewhere in the codebase as well. But most of the time it looks (at least to me) like their main use is at init/load time.

EDIT: This will also add translation layers to the configs for legacy mappings when loading the various configs (main, MetaCAT, TNER, RelCAT).

Also removed some of the unused config entries in RelCAT config.

This affects

  • Normal medcat config
  • Transformers NER config
  • MetaCAT config
  • RelCAT config

NOTE: I'm open to discussions on which config entries should stay where they were as well as which ones shouldn't be removed from RelCAT config.

PS: This might create issues downstream (i.e in tutorials and WWC). So if/when this PR will be approved, I'll look into creating PRs for those to go along with this one.

PPS: The main config's linking.subsample_after option is also unused. However, there is commented code for it to be used in context_based_linker.Linker._train so I left it in for now.

mart-r avatar May 30 '24 15:05 mart-r

Note: still need to add translation layers (along with tests) that allow loading and converting old format configs.

mart-r avatar May 31 '24 04:05 mart-r

~~This is a WIP.~~ Didn't manage to get rid of all the issues.

Best I can tell, before (i.e when actions was successful, e.g after 49d25ba) the config(s) loaded off disk weren't really being applied due to having no remapping. As such, some specific tests weren't being run as expected since they used default config instead.

This may also have something to do with the other config-related PR #449 since that might mean that some things aren't saved and/or loaded correctly on this branch.

In any case, ran out of time. So I'll pick back up once I'm back, so on the 10th of June.

mart-r avatar May 31 '24 18:05 mart-r

RelCAT (old version) should be good too :)

vladd-bit avatar Jul 22 '24 08:07 vladd-bit

Decided to go with #473 instead

mart-r avatar Aug 12 '24 14:08 mart-r