From 3312a7a0c47b3e3d30f8e21dd7da070ace98f939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad=20=C8=98tirbu?= Date: Tue, 8 Nov 2022 14:21:21 +0100 Subject: [PATCH 1/5] basic modelcard --- modelcard.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/modelcard.yaml b/modelcard.yaml index 7c540b1f..033d1dd3 100644 --- a/modelcard.yaml +++ b/modelcard.yaml @@ -3,6 +3,3 @@ model_details: version: name: 1.0.0 date: 2022-11-03 - run: - id: 2a84d204c6794965bc36641b46b77255 - type: mlflow From 9e71aa3192d4a253d6f390fe2814a6abecded832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad=20=C8=98tirbu?= Date: Fri, 18 Nov 2022 13:26:27 +0200 Subject: [PATCH 2/5] pinned mlflow version and fixed workflow branch --- .github/workflows/modelcard.yml | 2 +- Dockerfile | 2 +- conda.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/modelcard.yml b/.github/workflows/modelcard.yml index 1c4d4584..a2217087 100644 --- a/.github/workflows/modelcard.yml +++ b/.github/workflows/modelcard.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v3 - name: Check for model card file - uses: CompliancePal/modelcard-action@mlflow-action-experiments + uses: CompliancePal/modelcard-action@main env: MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} with: diff --git a/Dockerfile b/Dockerfile index 262d9519..e695ae40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM continuumio/anaconda3 RUN apt-get update RUN apt-get install -y git # Install python packages -RUN pip install mlflow[extras] +RUN pip install mlflow[extras]==1.29.0 RUN pip install pymysql WORKDIR /mlflow diff --git a/conda.yaml b/conda.yaml index efc71176..eb4511d9 100644 --- a/conda.yaml +++ b/conda.yaml @@ -7,4 +7,4 @@ dependencies: - scikit-learn>0.19.1 - pip - pip: - - mlflow + - mlflow==1.29.0 From 9b2c7298c125c364c599c7e4c28eb7ceccfb6253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad=20=C8=98tirbu?= Date: Fri, 18 Nov 2022 13:38:51 +0200 Subject: [PATCH 3/5] run on push in demos --- .github/workflows/modelcard.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/modelcard.yml b/.github/workflows/modelcard.yml index a2217087..87046ebc 100644 --- a/.github/workflows/modelcard.yml +++ b/.github/workflows/modelcard.yml @@ -1,8 +1,12 @@ name: modelcard-test on: + push: + branches: + - demos/* pull_request: - branches: [main] + branches: + - main workflow_dispatch: jobs: From e9e13be925c7908a062e053ee44526be7fdc546f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad=20=C8=98tirbu?= Date: Fri, 18 Nov 2022 13:41:50 +0200 Subject: [PATCH 4/5] added new rules --- .github/workflows/modelcard.yml | 1 + .rules/rules.yaml | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 .rules/rules.yaml diff --git a/.github/workflows/modelcard.yml b/.github/workflows/modelcard.yml index 87046ebc..4ae2a59b 100644 --- a/.github/workflows/modelcard.yml +++ b/.github/workflows/modelcard.yml @@ -22,3 +22,4 @@ jobs: 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..32e7c06d --- /dev/null +++ b/.rules/rules.yaml @@ -0,0 +1,8 @@ +rules: + model-documentation: + message: '{{error}}' + given: '$.model_details' + severity: error + then: + - function: truthy + field: documentation From a92dd59a4b2377c2c8652117a37f49bfeff8a250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vlad=20=C8=98tirbu?= Date: Fri, 18 Nov 2022 13:54:52 +0200 Subject: [PATCH 5/5] added documentation --- modelcard.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modelcard.yaml b/modelcard.yaml index 033d1dd3..57164cc5 100644 --- a/modelcard.yaml +++ b/modelcard.yaml @@ -1,5 +1,7 @@ model_details: name: Wine prediction + documentation: | + Now we have documentation! :tada: version: name: 1.0.0 date: 2022-11-03