diff --git a/.github/workflows/modelcard.yml b/.github/workflows/modelcard.yml index 1c4d4584..c35797d9 100644 --- a/.github/workflows/modelcard.yml +++ b/.github/workflows/modelcard.yml @@ -2,7 +2,11 @@ name: modelcard-test on: pull_request: - branches: [main] + branches: + - main + push: + branches: + - demos/* workflow_dispatch: jobs: @@ -13,8 +17,9 @@ jobs: uses: actions/checkout@v3 - name: Check for model card file - uses: CompliancePal/modelcard-action@mlflow-action-experiments - env: - MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} + uses: CompliancePal/modelcard-action@61-action-core + # env: + # MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} with: modelcard: modelcard.yaml + rules: .rules diff --git a/.rules/rules.yaml b/.rules/rules.yaml new file mode 100644 index 00000000..3de8e8d2 --- /dev/null +++ b/.rules/rules.yaml @@ -0,0 +1,7 @@ +rules: + model-documentation: + message: '{{error}}' + given: '$.model_details' + then: + - function: truthy + field: documentation diff --git a/modelcard.yaml b/modelcard.yaml index 7c540b1f..313fff87 100644 --- a/modelcard.yaml +++ b/modelcard.yaml @@ -1,8 +1,9 @@ model_details: name: Wine prediction + documentation: | + I now have documentation version: name: 1.0.0 date: 2022-11-03 run: - id: 2a84d204c6794965bc36641b46b77255 - type: mlflow + id: 7d0ad972fa5a40db90f075c5325a5611