Customising behaviour with action inputs
Closed this issue · 0 comments
vstirbu commented
Motivation
The behaviour of the action can be modified by the user to match the needs/conventions of its own ML project.
For example, the user can extend the default validation rules by adding their own rules in the repository where the action runs (#14 ), or they can disable the default rule set (#20).
Solution
Defining inputs
The modelcard default behaviour should be customisable by overriding the default values via the inputs defined in the action.yml
:
name: 'modelcard-action'
description: 'Check that the project has an appropriate model card'
inputs:
# an example parameter
parameter:
description: 'Parameter description'
required: false
default: '1'
runs:
using: 'docker'
image: 'Dockerfile'
Providing values
The user can customise the action behaviour in his repository by providing the values:
name: modelcard-test
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
file-exists:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Check for model card file
uses: CompliancePal/modelcard-action
# customisation
with:
parameter: value
Current parameters
input | default | required |
---|---|---|
customRules | .modelcard/rules |
false |
disableDefaultRules | false | false |