Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from CogStack:master #278

Merged
merged 5 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
container_name: medcattrainer
hostname: medcat
restart: always
image: cogstacksystems/medcat-trainer:v2.17.0
image: cogstacksystems/medcat-trainer:v2.17.1
volumes:
- ./configs:/home/configs
- api-media:/home/api/media
Expand All @@ -17,12 +17,12 @@ services:
env_file:
- ./envs/env-prod
environment:
- MCT_VERSION=v2.17.0
- MCT_VERSION=v2.17.1
command: /home/scripts/run.sh

# crontab - for db backup
medcattrainer-db-backup:
image: cogstacksystems/medcat-trainer:v2.17.0
image: cogstacksystems/medcat-trainer:v2.17.1
restart: always
volumes:
- ./configs:/home/configs
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

services:
medcattrainer:
image: cogstacksystems/medcat-trainer:v2.17.0
image: cogstacksystems/medcat-trainer:v2.17.1
restart: always
volumes:
- ./configs:/home/configs
Expand All @@ -14,12 +14,12 @@ services:
env_file:
- ./envs/env
environment:
- MCT_VERSION=v2.17.0
- MCT_VERSION=v2.17.1
command: /home/scripts/run.sh

# crontab - for db backup
medcattrainer-db-backup:
image: cogstacksystems/medcat-trainer:v2.17.0
image: cogstacksystems/medcat-trainer:v2.17.1
restart: always
volumes:
- ./configs:/home/configs
Expand Down
2 changes: 1 addition & 1 deletion webapp/api/api/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def calculate_metrics(project_ids: List[int], report_name: str):
"""
logger.info('Calculating metrics for report: %s', report_name)
projects = [ProjectAnnotateEntities.objects.filter(id=p_id).first() for p_id in project_ids]
if projects[0].cdb is None:
if projects[0].model_pack:
# assume the model pack is set.
cat = CAT.load_model_pack(projects[0].model_pack.model_pack.path)
else:
Expand Down
2 changes: 1 addition & 1 deletion webapp/api/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def save(self, *args, skip_load=False, **kwargs, ):
# load the CDB, and raise if this fails.
if not skip_load:
try:
CDB.load(self.cdb_file)
CDB.load(self.cdb_file.path)
except Exception as exc:
raise MedCATLoadException(f'Failed to load Concept DB from {self.cdb_file}, '
f'check if this CDB file successfully loads elsewhere') from exc
Expand Down
Loading