-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The current fix in parse_alignment_target_id function has a critical flaw when handling multiple KDMA names that contain underscores.
Current Logic Issue
The function uses the number of values to determine parsing strategy:
- 1 value: treat entire KDMA part as single name (fixes
personal_safety-0.0) - Multiple values: split KDMA part by underscores
Failing Case
Input: personal_safety_merit-0.0_1.0
- Values:
[0.0, 1.0](2 values) - KDMA names after underscore split:
["personal", "safety", "merit"](3 names) - 3 names ≠ 2 values → returns empty list ❌
Should parse as:
personal_safetywith value0.0meritwith value1.0
Root Cause
Using value count as a heuristic is unreliable because:
- KDMA names can contain underscores (
personal_safety) - Multiple KDMAs can also contain underscores
- No way to distinguish between name separators vs. name components
Potential Solutions
- Delimiter approach: Use a different delimiter between KDMA names (e.g., double underscore
__) - Length-based parsing: Use known KDMA name lengths/patterns
- Registry approach: Maintain a list of valid KDMA names and match against them
- Format change: Restructure alignment target ID format to avoid ambiguity
Location
File: align_browser/experiment_models.py:42-98
Function: parse_alignment_target_id
Priority
High - affects KDMA parsing accuracy for alignment targets
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels