Closed AgentM-GEG closed 3 weeks ago
tagging @ramanakumars as well for visibility and crosschecking.
Hi @CKrawczyk -- Would you mind reviewing this PR?
@CKrawczyk I added a test for the focus_classes
behavior and pushed those changes. I also changed a little bit of the reducer_wrapper
code where the focus_classes
argument is being parsed appropriately. Let me know how these changes look.
@CKrawczyk @lcjohnso , thank you! I am happy for it to be merged whenever works for either/both of you.
Context: The current version of the user-skill calculation is done on ALL detected classes present within a task (either the mean skill or that skill for all classes be above a certain
skill_threshold
). This creates a situation where, for a task with large number of classes OR imbalanced datasets, the user has to see at least N images per class before they get a chance to even be considered for leveling up.Motivation: Research teams should be given the opportunity to provide specific classes using which they can judge the leveling up decision.
This PR:
user_skill_reducer
function now takes infocus_classes
argument (default: None
).focus_classes
are provided (e.g., ['square', 'triangle']), then compute themean_skill
,null_removed_classes
, andnull_removed_class_counts
on these subset classes (instead of everything).lines 87-89
were done as this block of code is just repeated betweenif binary... else: ...
statement, with the only difference being thenull_class='False'
in the binary case.An example caeasar config looks as such:
.../reducers/user_skill_reducer?mode='one-to-one'&count_threshold=5&focus_classes=['1', '2']&strategy='all'&skill_threshold=0.2