mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-20 19:19:56 +00:00
fix(ci): better heuristic + issue type template fix (#2672)
* fix(ci): better heuristic + issue type template fix * chore(ci): remove keywords in performance tag
This commit is contained in:
@@ -27,10 +27,10 @@ body:
|
|||||||
label: Issue Type
|
label: Issue Type
|
||||||
description: What kind of ticket are you opening?
|
description: What kind of ticket are you opening?
|
||||||
options:
|
options:
|
||||||
- label: "🐛 Bug Report (Something isn't working)"
|
- "🐛 Bug Report (Something isn't working)"
|
||||||
- label: "💡 Feature Request / Improvement"
|
- "💡 Feature Request / Improvement"
|
||||||
- label: "❓ Technical Question"
|
- "❓ Technical Question"
|
||||||
- label: "🧹 Maintenance / Documentation"
|
- "🧹 Maintenance / Documentation"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -60,26 +60,17 @@ body:
|
|||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: context-repro
|
id: context-repro
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
attributes:
|
attributes:
|
||||||
label: Context & Reproduction
|
label: Context & Reproduction
|
||||||
description: |
|
description: |
|
||||||
Provide a code snippet, steps to reproduce a bug, or technical details about your proposal.
|
Provide a code snippet, steps to reproduce a bug, or technical details about your proposal.
|
||||||
Please use code blocks for logs and scripts.
|
Please use code blocks for scripts and CLI commands.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Steps to reproduce / Usage example:
|
Steps to reproduce / Usage example:
|
||||||
1.
|
1.
|
||||||
2.
|
2.
|
||||||
3.
|
3.
|
||||||
|
|
||||||
- type: textarea
|
|
||||||
id: expected-behavior
|
|
||||||
attributes:
|
|
||||||
label: Expected Behavior / Desired Outcome
|
|
||||||
description: "Describe what you expected to happen or what the ideal solution looks like."
|
|
||||||
placeholder: "e.g. The script should finish without OOM, or I would like a new flag --fast-mode."
|
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -32,64 +32,48 @@ jobs:
|
|||||||
- uses: actions/github-script@v8
|
- uses: actions/github-script@v8
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
// Setup Input Text (Unified Title + Body)
|
// Setup Input Text
|
||||||
const body = (context.payload.issue.body || '');
|
const body = (context.payload.issue.body || '');
|
||||||
const title = (context.payload.issue.title || '');
|
const title = (context.payload.issue.title || '');
|
||||||
|
const cleanBody = body.replace(/```[\s\S]*?```/g, '');
|
||||||
// We keep a lowercased version for keyword matching
|
const text = `${title}\n${cleanBody}`.toLowerCase();
|
||||||
const text = `${title}\n${body}`.toLowerCase();
|
|
||||||
|
|
||||||
const labelsToAdd = new Set();
|
const labelsToAdd = new Set();
|
||||||
|
|
||||||
// Helper: Simple regex test
|
|
||||||
const matches = (re) => re.test(text);
|
const matches = (re) => re.test(text);
|
||||||
|
|
||||||
// Issue Type Detection (Dropdowns & Explicit Headers)
|
// Keyword Heuristics
|
||||||
if (text.includes('bug report') || /\bissue type:.*bug/.test(text)) {
|
|
||||||
labelsToAdd.add('bug');
|
|
||||||
}
|
|
||||||
if (text.includes('feature request') || /\bissue type:.*feature/.test(text)) {
|
|
||||||
labelsToAdd.add('enhancement');
|
|
||||||
}
|
|
||||||
if (text.includes('technical question') || /\bissue type:.*question/.test(text)) {
|
|
||||||
labelsToAdd.add('question');
|
|
||||||
}
|
|
||||||
if (text.includes('maintenance') || /\bissue type:.*maintenance/.test(text)) {
|
|
||||||
labelsToAdd.add('documentation');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keyword Heuristic
|
|
||||||
|
|
||||||
// Domain Specific
|
// Domain Specific
|
||||||
if (matches(/example(s)?\b|script(s)?\b|sample(s)?\b|demo(s)?\b|notebook(s)?\b/i)) labelsToAdd.add('examples');
|
if (matches(/\b(bug|error|issue|fault|crash|exception|\b/i)) labelsToAdd.add('bug');
|
||||||
if (matches(/dataset(s)?\b|data loader|data augmentation|data preprocessing/i)) labelsToAdd.add('dataset');
|
if (matches(/\b(feature|enhancement|improvement|support|implement|proposal)\b/i)) labelsToAdd.add('enhancement');
|
||||||
if (matches(/mujoco|isaac|\bsimulation\b|\bsim /i)) labelsToAdd.add('simulation');
|
if (matches(/\b(question|help|how to||clarify|explain|unclear)\b/i)) labelsToAdd.add('question');
|
||||||
if (matches(/train|loss|optimizer|backward|gradient|wandb|sac\b/i)) labelsToAdd.add('training');
|
if (matches(/\b(maintenance|documentation|docs|readme|tutorial|guide|wiki)\b/i)) labelsToAdd.add('documentation');
|
||||||
if (matches(/rerun|plot|video|render|visualiz|gif/i)) labelsToAdd.add('visualization');
|
if (matches(/\b(example|script|sample|demo|notebook)s?\b/i)) labelsToAdd.add('examples');
|
||||||
if (matches(/camera|realsense|lidar|depth|sensor|imu|microphone|rgbd/i)) labelsToAdd.add('sensors');
|
if (matches(/\b(datasets?|data loader|data augmentation|data preprocessing)\b/i)) labelsToAdd.add('dataset');
|
||||||
if (matches(/aloha|koch|so-100|so100|mobile|teleop|manipulator|robot(s)?\b/i)) labelsToAdd.add('robots');
|
if (matches(/\b(mujoco|isaac|simulation|sim)\b/i)) labelsToAdd.add('simulation');
|
||||||
if (matches(/teleop|teleoperator|controller|leader|follower|joystick|gamepad/i)) labelsToAdd.add('teleoperators');
|
if (matches(/\b(train|training|loss|optimizer|backward|gradient|wandb|sac)\b/i)) labelsToAdd.add('training');
|
||||||
if (matches(/policy|policies|p0licy/i)) labelsToAdd.add('policies');
|
if (matches(/\b(rerun|plot|video|render|visualiz|gif)/i)) labelsToAdd.add('visualization');
|
||||||
if (matches(/processor(s)?\b|implement.*processor|processor pipeline/i)) labelsToAdd.add('processor');
|
if (matches(/\b(camera|realsense|lidar|depth|sensor|imu|microphone|rgbd)\b/i)) labelsToAdd.add('sensors');
|
||||||
if (matches(/eval|evaluate|evaluation|metric(s)?\b|score|benchmark/i)) labelsToAdd.add('evaluation');
|
if (matches(/\b(aloha|koch|so-100|so100|mobile|teleop|manipulator|robots?)\b/i)) labelsToAdd.add('robots');
|
||||||
|
if (matches(/\b(teleop|teleoperator|controller|leader|follower|joystick|gamepad)\b/i)) labelsToAdd.add('teleoperators');
|
||||||
|
if (matches(/\b(policy|policies|p0licy)\b/i)) labelsToAdd.add('policies');
|
||||||
|
if (matches(/\b(processors?|pipeline)\b/i)) labelsToAdd.add('processor');
|
||||||
|
if (matches(/\b(eval|evaluate|evaluation|metrics?|score|benchmark)\b/i)) labelsToAdd.add('evaluation');
|
||||||
|
|
||||||
// Infrastructure & Code Quality
|
// Infrastructure & Code Quality
|
||||||
if (matches(/test|pytest|unittest|failing test/i)) labelsToAdd.add('tests');
|
if (matches(/\b(tests?|pytest|unittest|failing test)\b/i)) labelsToAdd.add('tests');
|
||||||
if (matches(/ci|github actions|workflow|gha|action(s)?\b|pipeline/i)) {
|
if (matches(/\b(ci|github actions|workflow|gha|actions?|pipeline)\b/i)) {
|
||||||
labelsToAdd.add('CI');
|
labelsToAdd.add('CI');
|
||||||
labelsToAdd.add('github_actions');
|
labelsToAdd.add('github_actions');
|
||||||
}
|
}
|
||||||
if (matches(/perf|latency|benchmark|throughput|fps|speed|performance|benchmarking/i)) labelsToAdd.add('performance');
|
if (matches(/\b(perf|latency|throughput|fps|speed|performance)\b/i)) labelsToAdd.add('performance');
|
||||||
if (matches(/dependency|requirements|pip|conda|install error|importerror|package not found/i)) labelsToAdd.add('dependencies');
|
if (matches(/\b(dependency|requirements|pip|conda|install error|importerror|package not found)\b/i)) labelsToAdd.add('dependencies');
|
||||||
if (matches(/python\b|pyproject|requirements(\.txt)?|pip install|typing error/i)) labelsToAdd.add('python');
|
if (matches(/\b(python|pyproject|requirements(\.txt)?|pip install|typing error)\b/i)) labelsToAdd.add('python');
|
||||||
|
|
||||||
// Documentation & Meta
|
// Documentation & Meta
|
||||||
if (matches(/doc|documentation|docs|readme|typo|how to/i)) labelsToAdd.add('documentation');
|
if (matches(/\b(doc|documentation|docs|readme|typo|how to)\b/i)) labelsToAdd.add('documentation');
|
||||||
if (matches(/refactor|cleanup|restructure|rename|modernize code/i)) labelsToAdd.add('refactor');
|
if (matches(/\b(refactor|cleanup|restructure|rename|modernize code)\b/i)) labelsToAdd.add('refactor');
|
||||||
if (matches(/release|changelog|version bump|cut a release|tag v/i)) labelsToAdd.add('release');
|
if (matches(/\b(release|changelog|version bump|cut a release|tag v)\b/i)) labelsToAdd.add('release');
|
||||||
|
if (matches(/\b(breaking change|major change)\b/i)) labelsToAdd.add('breaking change');
|
||||||
// Fixed: "BREAKING CHANGE" must be lowercase in regex because 'text' is lowercase
|
|
||||||
if (matches(/breaking change|breaking:|major change/i)) labelsToAdd.add('breaking change');
|
|
||||||
|
|
||||||
// Apply Labels
|
// Apply Labels
|
||||||
const labels = Array.from(labelsToAdd).filter(Boolean);
|
const labels = Array.from(labelsToAdd).filter(Boolean);
|
||||||
|
|||||||
Reference in New Issue
Block a user