MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / update_feedback_state

Function update_feedback_state

experiments/baselines/scholar_inbox/runner.py:575–589  ·  view source on GitHub ↗
(
    state: UserFeedbackState,
    source_rows: List[Dict[str, Any]],
    label_map: Dict[Tuple[str, str], Dict[str, Any]],
    *,
    background_negatives_per_day: int,
)

Source from the content-addressed store, hash-verified

573
574
575def update_feedback_state(
576 state: UserFeedbackState,
577 source_rows: List[Dict[str, Any]],
578 label_map: Dict[Tuple[str, str], Dict[str, Any]],
579 *,
580 background_negatives_per_day: int,
581) -> None:
582 for row in source_rows:
583 label = label_map.get((str(row.get("episode_id") or ""), paper_identity(row)), {})
584 if not label.get("selected"):
585 continue
586 state.update_positive_text(paper_text(row), weight=1.0)
587
588 for row in stable_background_rows(source_rows, label_map, background_negatives_per_day):
589 state.update_negative_text(paper_text(row), weight=0.10)
590
591
592def load_user_metadata(input_dir: Path) -> Dict[str, Dict[str, Any]]:

Callers 1

rerank_episodesFunction · 0.70

Calls 6

stable_background_rowsFunction · 0.85
getMethod · 0.80
update_positive_textMethod · 0.80
update_negative_textMethod · 0.80
paper_identityFunction · 0.70
paper_textFunction · 0.70

Tested by

no test coverage detected