File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class Element(BaseModel):
4949 z_index : int = 0
5050
5151 # ML reranking metadata (optional - can be absent or null)
52- rerank_index : int | None = None # 0-based, The rank after ML reranking
52+ fused_rank_index : int | None = None # 0-based, The rank index after ML reranking
5353 heuristic_index : int | None = None # 0-based, Where it would have been without ML
5454 ml_probability : float | None = None # Confidence score from ONNX model (0.0 - 1.0)
5555 ml_score : float | None = None # Raw logit score (optional, for debugging)
Original file line number Diff line number Diff line change 149149 "in_viewport" : {"type" : " boolean" },
150150 "is_occluded" : {"type" : " boolean" },
151151 "z_index" : {"type" : " integer" },
152- "rerank_index " : {"type" : [" integer" , " null" ]},
152+ "fused_rank_index " : {"type" : [" integer" , " null" ]},
153153 "heuristic_index" : {"type" : [" integer" , " null" ]},
154154 "ml_probability" : {"type" : [" number" , " null" ]},
155155 "ml_score" : {"type" : [" number" , " null" ]},
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ def test_element_ml_fields_optional():
152152 is_occluded = False ,
153153 z_index = 0 ,
154154 )
155- assert element_without_ml .rerank_index is None
155+ assert element_without_ml .fused_rank_index is None
156156 assert element_without_ml .heuristic_index is None
157157 assert element_without_ml .ml_probability is None
158158 assert element_without_ml .ml_score is None
@@ -168,12 +168,12 @@ def test_element_ml_fields_optional():
168168 in_viewport = True ,
169169 is_occluded = False ,
170170 z_index = 1 ,
171- rerank_index = 0 ,
171+ fused_rank_index = 0 ,
172172 heuristic_index = 5 ,
173173 ml_probability = 0.95 ,
174174 ml_score = 2.34 ,
175175 )
176- assert element_with_ml .rerank_index == 0
176+ assert element_with_ml .fused_rank_index == 0
177177 assert element_with_ml .heuristic_index == 5
178178 assert element_with_ml .ml_probability == 0.95
179179 assert element_with_ml .ml_score == 2.34
@@ -189,10 +189,10 @@ def test_element_ml_fields_optional():
189189 in_viewport = True ,
190190 is_occluded = False ,
191191 z_index = 0 ,
192- rerank_index = 1 ,
192+ fused_rank_index = 1 ,
193193 ml_probability = 0.87 ,
194194 )
195- assert element_partial .rerank_index == 1
195+ assert element_partial .fused_rank_index == 1
196196 assert element_partial .heuristic_index is None
197197 assert element_partial .ml_probability == 0.87
198198 assert element_partial .ml_score is None
You can’t perform that action at this time.
0 commit comments