Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: api-docs

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:

if: |
github.repository == 'CogStack/CogStack-ModelServe' &&
github.ref == 'refs/heads/master' &&
github.ref == 'refs/heads/main' &&
github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
exit 0
fi
- name: Update OpenAPI docs
uses: ad-m/github-push-action@master
uses: ad-m/github-push-action@main
with:
branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/docker-extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: docker extra
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [ main ]
paths:
- 'docker/mlflow/**'
pull_request:
branches: [ master ]
branches: [ main ]
paths:
- 'docker/mlflow/**'

Expand All @@ -29,7 +29,7 @@ jobs:
needs: lint
if: |
github.repository == 'CogStack/CogStack-ModelServe' &&
github.ref == 'refs/heads/master' &&
github.ref == 'refs/heads/main' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: docker
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

env:
REGISTRY: docker.io
Expand All @@ -25,7 +25,7 @@ jobs:
needs: lint
if: |
github.repository == 'CogStack/CogStack-ModelServe' &&
github.ref == 'refs/heads/master' &&
github.ref == 'refs/heads/main' &&
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions app/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class ModelCard(BaseModel):
model_type: ModelType = Field(description="The type of the served model")
model_description: Optional[str] = Field(description="The description about the served model")
model_card: Optional[dict] = Field(default=None, description="The metadata of the served model")
labels: Optional[Dict[str, str]] = Field(default=None, description="The mapping of CUIs to names")


class Entity(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions app/model_services/medcat_model_deid.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def info(self) -> ModelCard:
model_type=ModelType.ANONCAT,
api_version=self.api_version,
model_card=model_card,
labels=self.model.cdb.cui2preferred_name,
)

def annotate(self, text: str) -> List[Annotation]:
Expand Down
1 change: 1 addition & 0 deletions tests/app/api/test_serving_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def test_train_unsupervised_with_hf_hub_dataset(model_service, client):
"model_description": "huggingface_ner_model_description",
"model_type": ModelType.MEDCAT_SNOMED,
"model_card": None,
"labels": None,
})
model_service.info.return_value = model_card
model_service.train_unsupervised.return_value = (True, "experiment_id", "run_id")
Expand Down
1 change: 1 addition & 0 deletions tests/app/api/test_serving_hf_ner.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_train_unsupervised_with_hf_hub_dataset(model_service, client):
"model_description": "huggingface_ner_model_description",
"model_type": ModelType.HUGGINGFACE_NER,
"model_card": None,
"labels": None,
})
model_service.info.return_value = model_card
model_service.train_unsupervised.return_value = (True, "experiment_id", "run_id")
Expand Down
2 changes: 2 additions & 0 deletions tests/app/api/test_serving_trf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_readyz(model_service, client):
"model_description": "deid_model_description",
"model_type": ModelType.TRANSFORMERS_DEID,
"model_card": None,
"labels": None,
})
model_service.info.return_value = model_card

Expand All @@ -49,6 +50,7 @@ def test_info(model_service, client):
"model_description": "deid_model_description",
"model_type": ModelType.TRANSFORMERS_DEID,
"model_card": None,
"labels": None,
})
model_service.info.return_value = model_card

Expand Down
Loading