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
6 changes: 3 additions & 3 deletions .github/workflows/labeler-train.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Train the Issues, Discussions, and Pull Requests models for label prediction
# Train the Issues, Pull Requests, and Discussions models for label prediction
name: "Labeler: Training"

on:
workflow_dispatch:
inputs:
type:
description: "Issues, Discussions, or Pull Requests"
description: "Issues, Pull Requests, or Discussions"
type: choice
required: true
default: "All"
options:
- "All"
- "Issues"
- "Discussions"
- "Pull Requests"
- "Discussions"

steps:
description: "Training Steps"
Expand Down
2 changes: 1 addition & 1 deletion IssueLabeler/src/Tester/Tester.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"**No Existing Label**: A prediction was made, but there was no existing label. Incorrect prediction."
]);
summary.AddNewLine();
summary.AddAlert($"If the **Matches** percentage is **at least 65%** and the **Mismatches** percentage is **less than 10%**, the model testing is considered favorable.", AlertType.Tip);
summary.AddAlert($"If the **Matches** percentage is **at least 65%** and the **Mismatches** percentage is **less than 15%**, the model testing is considered favorable.", AlertType.Tip);
});
}

Expand Down
12 changes: 6 additions & 6 deletions download/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: "Download Data"
description: "Download GitHub issues, discussions, or pull requests and cache the data."
description: "Download GitHub issues, pull requests, or discussions and cache the data."

branding:
color: "purple"
icon: "tag"

inputs:
type:
description: "The type of data to download. Must be 'issues', 'discussions', or 'pulls'."
description: "The type of data to download. Must be 'issues', 'pulls', or 'discussions'."
required: true
label_prefix:
description: "The label prefix to be used for model training. Must end in a non-alphanumeric character."
Expand All @@ -34,10 +34,10 @@ runs:
- name: "Validate inputs and set cache variables"
shell: bash
run: |
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then
echo "::error::'type' must be one of 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'"
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then
echo "::error::'type' must be one of 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'"
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be one of 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be one of 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY
exit 1
fi

Expand Down Expand Up @@ -94,5 +94,5 @@ runs:
shell: bash
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} Data Available as '${{ inputs.cache_key }}'" >> $GITHUB_STEP_SUMMARY
echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} Data Available as '${{ inputs.cache_key }}'" >> $GITHUB_STEP_SUMMARY
echo "The '${{ inputs.cache_key }}' data is saved to cache and available for training a model." >> $GITHUB_STEP_SUMMARY
12 changes: 6 additions & 6 deletions restore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Restore a model from cache for label prediction or cache retention

inputs:
type:
description: "The model to restore. Must be 'issues', 'discussions', or 'pulls'. Each type restores its own cached model file."
description: "The model to restore. Must be 'issues', 'pulls', or 'discussions'. Each type restores its own cached model file."
required: true

cache_key:
Expand Down Expand Up @@ -33,10 +33,10 @@ runs:
- name: "Validate Inputs"
shell: bash
run: |
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then
echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'."
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then
echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'."
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY
exit 1
fi

Expand All @@ -54,10 +54,10 @@ runs:
run: |
if [[ "${{ steps.restore-cache.outputs.cache-hit }}" == "true" ]]; then
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} model was successfully restored from cache." >> $GITHUB_STEP_SUMMARY
echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} model was successfully restored from cache." >> $GITHUB_STEP_SUMMARY
else
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} model was not restored from cache. Label prediction cannot proceed." >> $GITHUB_STEP_SUMMARY
echo "> The ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} model was not restored from cache. Label prediction cannot proceed." >> $GITHUB_STEP_SUMMARY

if [[ "${{ inputs.fail-on-cache-miss }}" != "true" ]]; then
echo "> The workflow is gracefully exiting without failure." >> $GITHUB_STEP_SUMMARY
Expand Down
10 changes: 5 additions & 5 deletions test/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: "Test Model"
description: "Test predictions against the Issues, Discussions, and/or Pull Requests model by downloading data and comparing predictions against existing labels."
description: "Test predictions against the Issues, Pull Requests, and/or Discussions model by downloading data and comparing predictions against existing labels."

branding:
color: "purple"
icon: "tag"

inputs:
type:
description: "The model to test. Must be 'issues', 'discussions', or 'pulls'. Discussions use the issues model path."
description: "The model to test. Must be 'issues', 'pulls', or 'discussions'. Discussions use the issues model path."
required: true
label_prefix:
description: "The label prefix to use for model training. Must end with a non-alphanumeric character."
Expand Down Expand Up @@ -39,10 +39,10 @@ runs:
- name: "Validate Inputs"
shell: bash
run: |
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then
echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'."
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then
echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'."
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY
exit 1
fi

Expand Down
12 changes: 6 additions & 6 deletions train/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "Train Model"
description: "Train the Issues, Discussions, or Pull Requests model for label prediction. Each type writes its own cached model file."
description: "Train the Issues, Pull Requests, or Discussions model for label prediction. Each type writes its own cached model file."

inputs:
type:
description: "The model to train. Must be 'issues', 'discussions', or 'pulls'."
description: "The model to train. Must be 'issues', 'pulls', or 'discussions'."
required: true
data_cache_key:
description: "The cache key suffix to use for the downloaded data. Defaults to 'staged'."
Expand All @@ -22,10 +22,10 @@ runs:
- name: "Validate Inputs"
shell: bash
run: |
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "discussions" && "${{ inputs.type }}" != "pulls" ]]; then
echo "::error::'type' must be 'issues', 'discussions', or 'pulls'. Value provided: '${{ inputs.type }}'."
if [[ "${{ inputs.type }}" != "issues" && "${{ inputs.type }}" != "pulls" && "${{ inputs.type }}" != "discussions" ]]; then
echo "::error::'type' must be 'issues', 'pulls', or 'discussions'. Value provided: '${{ inputs.type }}'."
echo "> [!CAUTION]" >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'discussions', or 'pulls'." >> $GITHUB_STEP_SUMMARY
echo "\`type\` must be 'issues', 'pulls', or 'discussions'." >> $GITHUB_STEP_SUMMARY
exit 1
fi

Expand Down Expand Up @@ -92,7 +92,7 @@ runs:
shell: bash
run: |
echo "" >> $GITHUB_STEP_SUMMARY
echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'discussions' && 'Discussions' || 'Pull Requests' }} Model Available as '${{ inputs.model_cache_key }}'." >> $GITHUB_STEP_SUMMARY
echo "## ${{ inputs.type == 'issues' && 'Issues' || inputs.type == 'pulls' && 'Pull Requests' || 'Discussions' }} Model Available as '${{ inputs.model_cache_key }}'." >> $GITHUB_STEP_SUMMARY

if [[ "${{ inputs.model_cache_key }}" == "ACTIVE" ]]; then
echo "Label predictions will now use this model." >> $GITHUB_STEP_SUMMARY
Expand Down