build_cross_task_encoder_summary
Build per-trainer encoder summaries on the shared cross-task test pool.
Each binary GRADIEND encodes every test transition in the merged pool
(e.g. he->she, she->he, jewish->christian, ...) using that trainer's model.
Rows with label == 0 are kept: they are cross-domain probes where the
snippet's factual class is outside the trainer's pair.
When cache_only=True, unified encoder CSVs are loaded from disk only:
no trainer datasets are materialized and no models are loaded for encoding.
Missing or stale caches yield empty encoder_df entries with a warning.
Set allow_incomplete_cache=True to intentionally use directed but
incomplete cache rows in cache-only mode; this is useful for diagnostic
partial plots and should not be used for final paper figures.
When force_recompute=True, existing unified encoder CSVs are ignored,
fresh probe rows are encoded, and the unified cache is overwritten when
artifact caching is enabled.
When seed_selection is omitted, trainers with
analyze_seed_stability=True automatically use all convergent seed
checkpoints and aggregate encoder responses (same rule as suite plots).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trainers
|
Dict[str, object]
|
Mapping from trainer id to trainer object. |
required |
feature_classes
|
Optional[Sequence[str]]
|
Deprecated compatibility argument. The shared eval pool
is inferred from |
None
|
eval_rows
|
Optional[DataFrame]
|
Optional prebuilt unified rows for the shared pool. |
None
|
eval_by_class
|
Optional[Dict[str, DataFrame]]
|
Optional prebuilt unified rows grouped by feature class. |
None
|
Source code in gradiend/comparison/cross_encoding.py
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 | |