Skip to content

Commit bee0195

Browse files
authored
[CCV-0] Fix indexed classification tests (#1931)
1 parent 1869d88 commit bee0195

File tree

1 file changed

+92
-20
lines changed

1 file changed

+92
-20
lines changed

libs/labelbox/tests/data/annotation_import/conftest.py

Lines changed: 92 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,9 +1598,9 @@ def text_inference_index_mmc(
15981598
def video_checklist_inference(prediction_id_mapping):
15991599
checklists = []
16001600
for feature in prediction_id_mapping:
1601-
if "checklist" not in feature:
1601+
if "checklist_index" not in feature:
16021602
continue
1603-
checklist = feature["checklist"].copy()
1603+
checklist = feature["checklist_index"].copy()
16041604
checklist.update(
16051605
{
16061606
"answers": [
@@ -2203,27 +2203,99 @@ def expected_export_v2_text():
22032203
@pytest.fixture()
22042204
def expected_export_v2_video():
22052205
expected_annotations = {
2206-
"frames": {},
2207-
"segments": {"<cuid>": [[7, 13], [18, 19]]},
2208-
"key_frame_feature_map": {},
2209-
"classifications": [
2210-
{
2211-
"name": "checklist",
2212-
"value": "checklist",
2213-
"checklist_answers": [
2206+
"classifications": [],
2207+
"frames": {
2208+
"7": {
2209+
"objects": {},
2210+
"classifications": [
22142211
{
2215-
"name": "first_checklist_answer",
2216-
"value": "first_checklist_answer",
2217-
"classifications": [],
2218-
},
2212+
"name": "checklist_index",
2213+
"value": "checklist_index",
2214+
"checklist_answers": [
2215+
{
2216+
"name": "first_checklist_answer",
2217+
"value": "first_checklist_answer",
2218+
"classifications": []
2219+
},
2220+
{
2221+
"name": "second_checklist_answer",
2222+
"value": "second_checklist_answer",
2223+
"classifications": []
2224+
}
2225+
]
2226+
}
2227+
]
2228+
},
2229+
"13": {
2230+
"objects": {},
2231+
"classifications": [
22192232
{
2220-
"name": "second_checklist_answer",
2221-
"value": "second_checklist_answer",
2222-
"classifications": [],
2223-
},
2224-
],
2233+
"name": "checklist_index",
2234+
"value": "checklist_index",
2235+
"checklist_answers": [
2236+
{
2237+
"name": "first_checklist_answer",
2238+
"value": "first_checklist_answer",
2239+
"classifications": []
2240+
},
2241+
{
2242+
"name": "second_checklist_answer",
2243+
"value": "second_checklist_answer",
2244+
"classifications": []
2245+
}
2246+
]
2247+
}
2248+
]
2249+
},
2250+
"18": {
2251+
"objects": {},
2252+
"classifications": [
2253+
{
2254+
"name": "checklist_index",
2255+
"value": "checklist_index",
2256+
"checklist_answers": [
2257+
{
2258+
"name": "first_checklist_answer",
2259+
"value": "first_checklist_answer",
2260+
"classifications": []
2261+
},
2262+
{
2263+
"name": "second_checklist_answer",
2264+
"value": "second_checklist_answer",
2265+
"classifications": []
2266+
}
2267+
]
2268+
}
2269+
]
2270+
},
2271+
"19": {
2272+
"objects": {},
2273+
"classifications": [
2274+
{
2275+
"name": "checklist_index",
2276+
"value": "checklist_index",
2277+
"checklist_answers": [
2278+
{
2279+
"name": "first_checklist_answer",
2280+
"value": "first_checklist_answer",
2281+
"classifications": []
2282+
},
2283+
{
2284+
"name": "second_checklist_answer",
2285+
"value": "second_checklist_answer",
2286+
"classifications": []
2287+
}
2288+
]
2289+
}
2290+
]
22252291
}
2226-
],
2292+
},
2293+
"segments": {
2294+
"<cuid>": [[7, 13], [18, 19]],
2295+
},
2296+
"key_frame_feature_map": {
2297+
"<cuid>": [7, 13, 18, 19],
2298+
},
22272299
}
22282300
return expected_annotations
22292301

0 commit comments

Comments
 (0)