Commit e39f0bd
fix: Fix deepcopy for RubricGenerationConfig in RubricBasedMetric.
The `GenerativeModel` instance within `RubricGenerationConfig` cannot be deepcopied directly. This change introduces a helper function to safely deepcopy the configuration by temporarily setting the `model` attribute to `None` before deepcopying and restoring it afterwards.
PiperOrigin-RevId: 8046059671 parent fe577ee commit e39f0bd
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
1022 | 1040 | | |
1023 | 1041 | | |
1024 | 1042 | | |
| |||
1095 | 1113 | | |
1096 | 1114 | | |
1097 | 1115 | | |
1098 | | - | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
1099 | 1119 | | |
1100 | 1120 | | |
1101 | 1121 | | |
| |||
0 commit comments