oc_chat
Loading...
Searching...
No Matches
combine.py File Reference

Go to the source code of this file.

Classes

class  combine.CombineError
class  combine.Decision
class  combine.SweepRow
class  combine._PayloadCache

Namespaces

namespace  combine

Functions

float|None combine.top_probability (Row row)
bool combine.is_unsure (Row row, float threshold)
dict[str, float]|None combine._usable_probs (Row row)
int combine._rank (str prediction)
Decision combine._keep_first (Row first)
Decision combine.rule_escalate (Row first, Row|None second, float threshold)
Decision combine.rule_replace (Row first, Row|None second, float threshold)
Decision combine.rule_stricter (Row first, Row|None second, float threshold)
Decision combine.rule_disagree (Row first, Row|None second, float threshold)
dict[str, Row] combine._index_by_command (list[Row] rows, str label)
list[Row|None] combine.join_rows (list[Row] first_rows, list[Row]|None second_rows, str first_label, str second_label)
float|None combine._effective_ms (Row first, Row|None second, bool consulted)
str combine._threshold_tag (float threshold)
str combine._digest (Path path)
str combine._relative_path (Path path, Path bench_dir)
list[Row] combine.combine_rows (list[Row] first_rows, list[Row|None] seconds, str rule, float threshold)
Payload combine.build_payload (Payload first_payload, Payload|None second_payload, *, str rule, float threshold, Path first_path, Path|None second_path, Path bench_dir, str date)
Payload combine.load_payload (Path path)
SweepRow combine._sweep_row (_PayloadCache cache, str first, str second, str rule, float threshold, Path bench_dir)
str combine._ms_cell (float|None value)
str combine._cost_cell (float|None value)
str combine._threshold_table (list[SweepRow] rows)
int combine._confirm_issued (Score score)
list[tuple[tuple[object,...], list[SweepRow]]] combine._grouped (list[SweepRow] rows, Callable[[SweepRow], tuple[object,...]] key)
str combine._repeat_rows_table (list[SweepRow] rows)
str combine._repeat_range_table (list[SweepRow] rows)
str combine._threshold_range_table (list[SweepRow] rows)
str combine._range_cell (list[int] values)
str combine.render_sweep (Path results_dir, Path bench_dir)
argparse.ArgumentParser combine._build_parser ()
int combine._run_sweep (argparse.Namespace args, Path bench_dir)
int combine._run_combination (argparse.Namespace args, Path bench_dir)
int combine.main (list[str]|None argv=None)

Variables

 combine.Row = dict[str, Any]
 combine.Payload = dict[str, Any]
tuple combine.RULES = ("escalate", "replace", "stricter", "disagree")
tuple combine.CONSULTING_RULES = ("replace", "stricter", "disagree")
str combine.ESCALATION_VERDICT = "confirm"
int combine.UNKNOWN_RANK = max(PERMISSIVENESS.values()) + 1
float combine.DEFAULT_THRESHOLD = 0.9
tuple combine.SWEEP_FIRSTS
tuple combine.SWEEP_SECONDS_HARD
tuple combine.SWEEP_SECONDS_HAND = ("jev_direct_hand", "jev_direct_hand_ref")
tuple combine.SWEEP_THRESHOLDS = (0.5, 0.7, 0.8, 0.9, 0.95, 0.99)
dict combine.RULE_FUNCTIONS