diff --git a/.github/workflows/mlflow.yml b/.github/workflows/mlflow.yml deleted file mode 100644 index 28c83e7b..00000000 --- a/.github/workflows/mlflow.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Modelcard sync with MLflow run -on: - workflow_dispatch: {} - -jobs: - mlflow: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/mlflow-run-id - env: - MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} diff --git a/.github/workflows/modelcard.yml b/.github/workflows/modelcard.yml index 87046ebc..d5460e5a 100644 --- a/.github/workflows/modelcard.yml +++ b/.github/workflows/modelcard.yml @@ -1,12 +1,9 @@ name: modelcard-test on: - push: - branches: - - demos/* pull_request: branches: - - main + - master workflow_dispatch: jobs: @@ -19,6 +16,7 @@ jobs: - name: Check for model card file uses: CompliancePal/modelcard-action@main env: - MLFLOW_TRACKING_URI: ${{ secrets.MLFLOW_TRACKING_URI }} + MLFLOW_TRACKING_URI: ${{secrets.MLFLOW_TRACKING_URI}} with: modelcard: modelcard.yaml + rules: .rules diff --git a/.rules/functions/semver.js b/.rules/functions/semver.js new file mode 100644 index 00000000..7f9c5ecd --- /dev/null +++ b/.rules/functions/semver.js @@ -0,0 +1,12 @@ +export default (input) => { + const versionParts = input.split('.'); + + if (versionParts.length != 3 || versionParts.some((part) => isNaN(part))) { + return [ + { + message: + 'Version name must be in format MAJOR.MINOR.PATCH, see semantic versioning (https://semver.org/)', + }, + ]; + } +}; diff --git a/.rules/rules.yaml b/.rules/rules.yaml new file mode 100644 index 00000000..80dde3d6 --- /dev/null +++ b/.rules/rules.yaml @@ -0,0 +1,8 @@ +functions: [semver] +rules: + legal-version-name: + message: '{{error}}' + severity: error + given: '$.model_details.version.name' + then: + function: semver diff --git a/modelcard.yaml b/modelcard.yaml index 033d1dd3..c531e493 100644 --- a/modelcard.yaml +++ b/modelcard.yaml @@ -1,5 +1,14 @@ model_details: name: Wine prediction version: - name: 1.0.0 + name: 0.0.1 date: 2022-11-03 + run: + type: mlflow + id: 35c174ef99c04747b0467aaeabf70773 + description: | + + ## Wine quality prediction + This model predicts the quality of wine batches based on physicochemical inputs and sensory outputs. + references: + - reference: http://made-up-exam.ple/