|
| list[dict[str, str]] | encoder_classifier.read_jsonl (Path path) |
| frozenset[str] | encoder_classifier.held_out_commands (Path bench_dir) |
| list[dict[str, str]] | encoder_classifier.load_split (Path bench_dir, str name, frozenset[str] held_out) |
| dict[str, int] | encoder_classifier.label_counts (list[dict[str, str]] rows) |
| list[list[dict[str, str]]] | encoder_classifier.epoch_batches (list[dict[str, str]] rows, int batch, random.Random rng) |
| list[list[int]] | encoder_classifier.tokenise (list[str] commands, object tokenizer, int max_length) |
| tuple[str,...] | encoder_classifier.tokenise_keys (object tokenizer) |
| int | encoder_classifier.full_vocab_size (object tokenizer) |
| tuple[list[int], dict[int, int]] | encoder_classifier.prune_vocab (list[str] corpus, object tokenizer, int reserve=DEFAULT_VOCAB_RESERVE, int max_length=DEFAULT_MAX_LENGTH) |
| float | encoder_classifier.token_coverage (list[str] commands, object tokenizer, set[int]|list[int] kept, int max_length=DEFAULT_MAX_LENGTH) |
| int | encoder_classifier.resolve_max_length (list[str] commands, object tokenizer, int requested, int fallback=DEFAULT_MAX_LENGTH) |
| str | encoder_classifier.cache_key (Path corpus_path, str tokenizer_digest, int max_length) |
| list[list[int]]|None | encoder_classifier.load_cached_ids (Path cache_root, str key) |
| Path | encoder_classifier.store_cached_ids (Path cache_root, str key, list[list[int]] rows) |
| list[int] | encoder_classifier.remap_lookup (dict[int, int] remap, int unknown_id, int size) |
| list[dict[str, str]] | encoder_classifier.validation_subset (list[dict[str, str]] rows, int size, int seed=DEFAULT_SUBSET_SEED) |
| dict[str, float] | encoder_classifier.probabilities (list[float] logits, float temperature=1.0) |
| float | encoder_classifier.brier (dict[str, float] probs, str truth) |
| float | encoder_classifier.mean_negative_log_likelihood (list[list[float]] logits, list[int] labels, float temperature, list[float]|None weights=None) |
| float | encoder_classifier.fit_temperature (list[list[float]] logits, list[int] labels, list[float]|None weights=None, float low=0.05, float high=20.0) |
| dict[str, float|int] | encoder_classifier.calibration_report (list[list[float]] logits, list[dict[str, str]] rows, float temperature) |
| list[list[float]] | encoder_classifier.cost_matrix (float alpha=DEFAULT_ALPHA) |
| float | encoder_classifier.expected_cost_of (dict[str, float] probs, str pred, list[list[float]] costs) |
| str | encoder_classifier.min_cost_verdict (dict[str, float] probs, list[list[float]] costs) |
| str | encoder_classifier.decide (dict[str, float] probs, str decision=DEFAULT_DECISION, list[list[float]]|None costs=None) |
| float | encoder_classifier.expected_cost (list[list[float]] prob_rows, list[int] labels, list[list[float]] costs) |
| float | encoder_classifier.stopping_value (dict[str, float|int] record, str metric=DEFAULT_STOP_METRIC) |
| dict[str, float|int|bool] | encoder_classifier.select_best_epoch (list[tuple[float, float]] pairs, str metric=DEFAULT_STOP_METRIC, int patience=1, float min_delta=EARLY_STOP_MIN_DELTA) |
| str | encoder_classifier.other_stop_metric (str metric) |
| bool | encoder_classifier.grants_more_permission (str truth, str pred) |
| dict[str, int] | encoder_classifier.confident_error_counts (list[dict[str, object]] rows, tuple[float,...] thresholds=CONFIDENT_THRESHOLDS) |
| str | encoder_classifier._normalised_program (str token) |
| bool | encoder_classifier._is_short_cluster (str token) |
| str|None | encoder_classifier.strip_recursive_option (str command) |
| tuple[list[dict[str, str]], int] | encoder_classifier.relabel_recursive_allow (list[dict[str, str]] rows, object classify) |
| object | encoder_classifier.gate_classifier (Path sandbox_root) |
| dict[str, object] | encoder_classifier.result_row (dict[str, str] case, list[float] logits, float temperature, float elapsed_ms, str decision=DEFAULT_DECISION, list[list[float]]|None costs=None) |
| None | encoder_classifier.write_result_file (Path path, str model, str condition, list[dict[str, object]] rows, dict[str, object] provenance) |
| str | encoder_classifier.file_digest (Path path) |
| str | encoder_classifier.weights_digest (Path model_dir) |
| tuple[str, bool] | encoder_classifier.verify_tokenizer_vocab (Path tokenizer_dir, str backbone, Path hf_home) |
| tuple[object, object, object] | encoder_classifier._require_torch () |
| str | encoder_classifier.resolve_device (str requested=DEFAULT_DEVICE) |
| int | encoder_classifier.peak_device_memory (str device) |
| str | encoder_classifier.describe_device (str device) |
| dict[str, object] | encoder_classifier._to_device (object encoded, str device) |
| object | encoder_classifier.remap_table (dict[int, int] remap, int unknown_id, int size, str device) |
| object | encoder_classifier._remap_input_ids (object input_ids, object table) |
| object | encoder_classifier.cost_tensor (list[list[float]] costs, str device) |
| object | encoder_classifier.expected_cost_term (object logits, object targets, object table) |
| int | encoder_classifier.slice_embeddings (object model, list[int] kept, int pad_row) |
| dict[str, object] | encoder_classifier._collate (list[list[int]] rows, int pad_id, tuple[str,...] extra_keys, str device) |
| object|None | encoder_classifier._saved_remap_table (Path model_dir, str device) |
| object | encoder_classifier._load_tokenizer (Path tokenizer_dir) |
| list[list[float]] | encoder_classifier._forward_logits (object model, object tokenizer, list[str] commands, int max_length, int batch, str device="cpu", object|None table=None) |
| float | encoder_classifier.score_full_validation (Path model_dir, list[dict[str, str]] rows, object tokenizer, int max_length, int batch, str device, object|None table) |
| dict[str, object] | encoder_classifier.train (TrainConfig config) |
| dict[str, float|int] | encoder_classifier.calibrate (Path model_dir, Path corpus_dir, int batch=DEFAULT_BATCH, int max_length=DEFAULT_MAX_LENGTH, int threads=DEFAULT_THREADS, str device=DEFAULT_DEVICE) |
| dict[str, object] | encoder_classifier.evaluate (Path model_dir, Path cases_path, str condition, Path out_path, str model_name, int batch=1, int max_length=DEFAULT_MAX_LENGTH, int threads=DEFAULT_THREADS, str device=DEFAULT_DEVICE, str decision=DEFAULT_DECISION, float alpha=DEFAULT_ALPHA) |
| dict[str, object] | encoder_classifier.relabel (Path bench_dir, Path out_dir) |
| Path | encoder_classifier._bench_dir () |
| argparse.ArgumentParser | encoder_classifier._build_parser () |
| int | encoder_classifier.main (list[str]|None argv=None) |