Skip to content

bug(medcat-den):CU-869bu4tum Fix wrapper save (attempt 2)#295

Merged
mart-r merged 11 commits intomainfrom
bug/medcat-den/CU-869bu4tum-fix-wrapper-save-try2
Jan 20, 2026
Merged

bug(medcat-den):CU-869bu4tum Fix wrapper save (attempt 2)#295
mart-r merged 11 commits intomainfrom
bug/medcat-den/CU-869bu4tum-fix-wrapper-save-try2

Conversation

@mart-r
Copy link
Copy Markdown
Collaborator

@mart-r mart-r commented Jan 19, 2026

The previous PR (#294) didn't actually fix the underlying issue.

This PR should do so. It makes the CATWrapper class a delegating wrapper that delegates the save method to the original object and delegates everything to it. That way the object is always saved correctly as CAT object. And only if/when loaded with CATWrapper does it get wrapped as that.

@tomolopolis
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

@tomolopolis tomolopolis left a comment

Choose a reason for hiding this comment

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

lgtm

@mart-r mart-r merged commit b88cd5e into main Jan 20, 2026
10 checks passed
@mart-r mart-r deleted the bug/medcat-den/CU-869bu4tum-fix-wrapper-save-try2 branch January 20, 2026 09:40
tomolopolis pushed a commit that referenced this pull request Jan 22, 2026
* CU-869bu4tum: Add test to make sure that saved model is NOT a wrapper

* CU-869bu4tum: Move wrapper to a fully delegating one

* CU-869bu4tum: Add a comment regarding setattr

* CU-869bu4tum: Add a few more tests for wrapper (i.e getting attributes, properties, methods)

* CU-869bu4tum: Fix injection tests

* CU-869bu4tum: Add some comments to injection tests

* CU-869bu4tum: Fix test time wrapping

* CU-869bu4tum: Add a few more comprehensive tests

* CU-869bu4tum: Add a few more comprehensive tests for property / method / attribtue getting

* CU-869bu4tum: Fix trainer property for wrapper

* CU-869bu4tum: Simplify trainer property
tomolopolis added a commit that referenced this pull request Feb 9, 2026
* feat(medcat-trainer): first pass at project admin initial page not using the django admin...

* bug(medcat-den):CU-869bu4tum Fix wrapper save (attempt 2) (#295)

* CU-869bu4tum: Add test to make sure that saved model is NOT a wrapper

* CU-869bu4tum: Move wrapper to a fully delegating one

* CU-869bu4tum: Add a comment regarding setattr

* CU-869bu4tum: Add a few more tests for wrapper (i.e getting attributes, properties, methods)

* CU-869bu4tum: Fix injection tests

* CU-869bu4tum: Add some comments to injection tests

* CU-869bu4tum: Fix test time wrapping

* CU-869bu4tum: Add a few more comprehensive tests

* CU-869bu4tum: Add a few more comprehensive tests for property / method / attribtue getting

* CU-869bu4tum: Fix trainer property for wrapper

* CU-869bu4tum: Simplify trainer property

* MedCAT v1: fixed relation infer output (entities not outputting start… (#297)

* MedCAT v1: fixed relation infer output (entities not outputting start/end char positions.

* Lints.

* feat(medcat-trainer): Externalise config for OIDC auth, allow top-level roles and add separate client for backend auth (#298)

* refactor(medcat-trainer): Externalise VITE_ env vars, introduce separate client for backend auth for clarity, update API migrations, ensure roles can be read from top-level role group.

* doc(medcat-trainer): Provide more comprehensive OIDC auth guide

* doc(medcat-trainer): Update OIDC Auth guide and installation file

* refactor(medcat-trainer): Address code review feedback

* chore(medcat-trainer): Potential fix for code scanning alert no. 151: Clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* refactor(medcat-trainer): Address more code review feedback

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat(medcat-trainer):  improved / fixed demo screen (#293)

* feat(medcat-trainer):  improved demo screen, model pack selection, new clinical text component, improved demo filtering concept picker

* fix(medcat-trainer): CU-8699ryke4: test type fixes

* fix(medcat-trainer): pr review changes

* fix(medcat-trainer): address auto feedback

---------

Co-authored-by: Tom Searle <tom@cogstack.org>

* fix(medcat-trainer): Postgres load_examples fails on unique constraint as models.py calls insert twice (#299)

* fix(medcat-trainer): Pass kwargs to ModelPack.save to stay consistent (#300)

* fix(medcat-trainer): Make VITE_ env vars mandatory only when VITE_USE_OIDC is set to true (#301)

* build(medcat-trainer): Improve dockerfile layer caching (#304)

* fix(medcat): CU-869bvptgq Relcat infer output for v2 (#303)

* CU-869bvptgq: Simplify relations output somewhat

* CU-869bvptgq: Add relation both entity start and end char positions

* CU-869bvptgq: Add entity start / end positions to rel-cat

* CU-869bvptgq: Add relevant changes to relation datasets

* CU-869bvptgq: Minor linting change

* CU-869bvptgq: Fix minor linting issue

* build(medcat-trainer): Consolidate github flows into one. Use standardised github actions for docker (#302)

* build(medcat-trainer): Use Docker actions for github CI builds

* build(medcat-trainer): Create a docker image for every PR

* build(medcat-trainer): Consolidate workflows into one file. Updating docker action

* build(medcat-trainer): Allow client pypi publish to fail for release builds

* feat(medcat-trainer): interim commit for project admin page

* feat(medcat-trainer): added same picker from demo page to admin project page, more options on the page

* feat(medcat-trainer): added clone feature to each project, can rename the clone.

* feat(medcat-trainer): added clone feature to each project, can rename the clone.

* feat(medcat-trainer): datasets, users, and model packs available now from the 'setting' cog'

* feat(medcat-trainer): split project admin into components, help text around dataset schema

* feat(medcat-trainer) fix row clicks of project admin, spacing

* fix(medcat-trainer): codeQL errors

* Potential fix for code scanning alert no. 158: Reflected server-side cross-site scripting

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 159: Information exposure through an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* feat(medcat-trainer): dataset action butons visible, style fixes

* fix(medcat-trainer): fix styling for admin forms not showing action buttons. Refactor common styles to _admin.scss

* fix(medcat-trainer): fix userform spaceing, and vite dev build cache

* feat(medcat-trainer): refactor project-admin styles, improve style consistency between buttons, action buttons, improve validation notifications, fix cdb_search_filter being set from model pack or concept_db

---------

Co-authored-by: Tom Searle <tom@cogstack.org>
Co-authored-by: Mart Ratas <mart.ratas@gmail.com>
Co-authored-by: Vlad Dinu <62345326+vladd-bit@users.noreply.github.com>
Co-authored-by: jocelyneholdbrook <jocelyne@cogstack.org>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Alistair Hendrickson <alistair@cogstack.org>
Co-authored-by: alhendrickson <159636032+alhendrickson@users.noreply.github.com>
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