Skip to content

Commit 8ea0fbf

Browse files
committed
imple priority
1 parent f5314c1 commit 8ea0fbf

File tree

1 file changed

+140
-0
lines changed

1 file changed

+140
-0
lines changed

fastlabel/__init__.py

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,12 @@ def create_image_task(
795795
file_path is a path to data. Supported extensions are png, jpg, jpeg (Required).
796796
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
797797
'approved', 'declined' (Optional).
798+
priority is the priority of the task (default: none) (Optional).
799+
Set one of the numbers corresponding to:
800+
none = 0,
801+
low = 10,
802+
medium = 20,
803+
high = 30,
798804
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
799805
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
800806
annotations is a list of annotation to be set in advance (Optional).
@@ -850,6 +856,12 @@ def create_image_classification_task(
850856
file_path is a path to data. Supported extensions are png, jpg, jpeg (Required).
851857
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
852858
'approved', 'declined' (Optional).
859+
priority is the priority of the task (default: none) (Optional).
860+
Set one of the numbers corresponding to:
861+
none = 0,
862+
low = 10,
863+
medium = 20,
864+
high = 30,
853865
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
854866
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
855867
attributes is a list of attribute to be set in advance (Optional).
@@ -905,6 +917,12 @@ def create_multi_image_task(
905917
are png, jpg, jpeg (Required).
906918
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
907919
'approved', 'declined' (Optional).
920+
priority is the priority of the task (default: none) (Optional).
921+
Set one of the numbers corresponding to:
922+
none = 0,
923+
low = 10,
924+
medium = 20,
925+
high = 30,
908926
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
909927
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
910928
annotations is a list of annotation to be set in advance (Optional).
@@ -984,6 +1002,12 @@ def create_video_task(
9841002
file_path is a path to data. Supported extensions are mp4 (Required).
9851003
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
9861004
'approved', 'declined' (Optional).
1005+
priority is the priority of the task (default: none) (Optional).
1006+
Set one of the numbers corresponding to:
1007+
none = 0,
1008+
low = 10,
1009+
medium = 20,
1010+
high = 30,
9871011
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
9881012
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
9891013
annotations is a list of annotation to be set in advance (Optional).
@@ -1039,6 +1063,12 @@ def create_video_classification_task(
10391063
file_path is a path to data. Supported extensions are mp4 (Required).
10401064
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
10411065
'approved', 'declined' (Optional).
1066+
priority is the priority of the task (default: none) (Optional).
1067+
Set one of the numbers corresponding to:
1068+
none = 0,
1069+
low = 10,
1070+
medium = 20,
1071+
high = 30,
10421072
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
10431073
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
10441074
attributes is a list of attribute to be set in advance (Optional).
@@ -1092,6 +1122,12 @@ def create_text_task(
10921122
file_path is a path to data. Supported extensions are txt (Required).
10931123
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
10941124
'approved', 'declined' (Optional).
1125+
priority is the priority of the task (default: none) (Optional).
1126+
Set one of the numbers corresponding to:
1127+
none = 0,
1128+
low = 10,
1129+
medium = 20,
1130+
high = 30,
10951131
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
10961132
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
10971133
annotations is a list of annotation to be set in advance (Optional).
@@ -1145,6 +1181,12 @@ def create_text_classification_task(
11451181
file_path is a path to data. Supported extensions are mp4 (Required).
11461182
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
11471183
'approved', 'declined' (Optional).
1184+
priority is the priority of the task (default: none) (Optional).
1185+
Set one of the numbers corresponding to:
1186+
none = 0,
1187+
low = 10,
1188+
medium = 20,
1189+
high = 30,
11481190
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
11491191
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
11501192
attributes is a list of attribute to be set in advance (Optional).
@@ -1196,6 +1238,12 @@ def create_audio_task(
11961238
file_path is a path to data. Supported extensions are mp4 (Required).
11971239
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
11981240
'approved', 'declined' (Optional).
1241+
priority is the priority of the task (default: none) (Optional).
1242+
Set one of the numbers corresponding to:
1243+
none = 0,
1244+
low = 10,
1245+
medium = 20,
1246+
high = 30,
11991247
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
12001248
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
12011249
annotations is a list of annotation to be set in advance (Optional).
@@ -1253,6 +1301,12 @@ def create_audio_classification_task(
12531301
file_path is a path to data. Supported extensions are mp4 (Required).
12541302
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
12551303
'approved', 'declined' (Optional).
1304+
priority is the priority of the task (default: none) (Optional).
1305+
Set one of the numbers corresponding to:
1306+
none = 0,
1307+
low = 10,
1308+
medium = 20,
1309+
high = 30,
12561310
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
12571311
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
12581312
attributes is a list of attribute to be set in advance (Optional).
@@ -1308,6 +1362,12 @@ def create_pcd_task(
13081362
file_path is a path to data. Supported extensions are pcd only (Required).
13091363
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
13101364
'approved', 'declined' (Optional).
1365+
priority is the priority of the task (default: none) (Optional).
1366+
Set one of the numbers corresponding to:
1367+
none = 0,
1368+
low = 10,
1369+
medium = 20,
1370+
high = 30,
13111371
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
13121372
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
13131373
annotations is a list of annotation to be set in advance (Optional).
@@ -1363,6 +1423,12 @@ def create_sequential_pcd_task(
13631423
pcd only (Required).
13641424
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
13651425
'approved', 'declined' (Optional).
1426+
priority is the priority of the task (default: none) (Optional).
1427+
Set one of the numbers corresponding to:
1428+
none = 0,
1429+
low = 10,
1430+
medium = 20,
1431+
high = 30,
13661432
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
13671433
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
13681434
annotations is a list of annotation to be set in advance (Optional).
@@ -1439,6 +1505,12 @@ def update_task(
14391505
task_id is an id of the task (Required).
14401506
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
14411507
'approved', 'declined' (Optional).
1508+
priority is the priority of the task (default: none) (Optional).
1509+
Set one of the numbers corresponding to:
1510+
none = 0,
1511+
low = 10,
1512+
medium = 20,
1513+
high = 30,
14421514
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
14431515
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
14441516
tags is a list of tag to be set (Optional).
@@ -1477,6 +1549,12 @@ def update_image_task(
14771549
task_id is an id of the task (Required).
14781550
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
14791551
'approved', 'declined' (Optional).
1552+
priority is the priority of the task (default: none) (Optional).
1553+
Set one of the numbers corresponding to:
1554+
none = 0,
1555+
low = 10,
1556+
medium = 20,
1557+
high = 30,
14801558
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
14811559
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
14821560
tags is a list of tag to be set (Optional).
@@ -1522,6 +1600,12 @@ def update_image_classification_task(
15221600
task_id is an id of the task (Required).
15231601
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
15241602
'approved', 'declined' (Optional).
1603+
priority is the priority of the task (default: none) (Optional).
1604+
Set one of the numbers corresponding to:
1605+
none = 0,
1606+
low = 10,
1607+
medium = 20,
1608+
high = 30,
15251609
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
15261610
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
15271611
attributes is a list of attribute to be set in advance (Optional).
@@ -1563,6 +1647,12 @@ def update_multi_image_task(
15631647
task_id is an id of the task (Required).
15641648
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
15651649
'approved', 'declined' (Optional).
1650+
priority is the priority of the task (default: none) (Optional).
1651+
Set one of the numbers corresponding to:
1652+
none = 0,
1653+
low = 10,
1654+
medium = 20,
1655+
high = 30,
15661656
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
15671657
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
15681658
tags is a list of tag to be set (Optional).
@@ -1604,6 +1694,12 @@ def update_video_task(
16041694
task_id is an id of the task (Required).
16051695
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
16061696
'approved', 'declined' (Optional).
1697+
priority is the priority of the task (default: none) (Optional).
1698+
Set one of the numbers corresponding to:
1699+
none = 0,
1700+
low = 10,
1701+
medium = 20,
1702+
high = 30,
16071703
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
16081704
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
16091705
tags is a list of tag to be set (Optional).
@@ -1647,6 +1743,12 @@ def update_video_classification_task(
16471743
task_id is an id of the task (Required).
16481744
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
16491745
'approved', 'declined' (Optional).
1746+
priority is the priority of the task (default: none) (Optional).
1747+
Set one of the numbers corresponding to:
1748+
none = 0,
1749+
low = 10,
1750+
medium = 20,
1751+
high = 30,
16501752
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
16511753
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
16521754
attributes is a list of attribute to be set in advance (Optional).
@@ -1688,6 +1790,12 @@ def update_text_task(
16881790
task_id is an id of the task (Required).
16891791
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
16901792
'approved', 'declined' (Optional).
1793+
priority is the priority of the task (default: none) (Optional).
1794+
Set one of the numbers corresponding to:
1795+
none = 0,
1796+
low = 10,
1797+
medium = 20,
1798+
high = 30,
16911799
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
16921800
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
16931801
tags is a list of tag to be set (Optional).
@@ -1731,6 +1839,12 @@ def update_text_classification_task(
17311839
task_id is an id of the task (Required).
17321840
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
17331841
'approved', 'declined' (Optional).
1842+
priority is the priority of the task (default: none) (Optional).
1843+
Set one of the numbers corresponding to:
1844+
none = 0,
1845+
low = 10,
1846+
medium = 20,
1847+
high = 30,
17341848
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
17351849
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
17361850
attributes is a list of attribute to be set in advance (Optional).
@@ -1772,6 +1886,12 @@ def update_audio_task(
17721886
task_id is an id of the task (Required).
17731887
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
17741888
'approved', 'declined' (Optional).
1889+
priority is the priority of the task (default: none) (Optional).
1890+
Set one of the numbers corresponding to:
1891+
none = 0,
1892+
low = 10,
1893+
medium = 20,
1894+
high = 30,
17751895
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
17761896
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
17771897
tags is a list of tag to be set (Optional).
@@ -1815,6 +1935,12 @@ def update_audio_classification_task(
18151935
task_id is an id of the task (Required).
18161936
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
18171937
'approved', 'declined' (Optional).
1938+
priority is the priority of the task (default: none) (Optional).
1939+
Set one of the numbers corresponding to:
1940+
none = 0,
1941+
low = 10,
1942+
medium = 20,
1943+
high = 30,
18181944
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
18191945
'sent_back', 'approved', 'declined', 'customer_declined' (Optional).
18201946
attributes is a list of attribute to be set in advance (Optional).
@@ -1856,6 +1982,12 @@ def update_pcd_task(
18561982
task_id is an id of the task (Required).
18571983
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
18581984
'approved', 'declined' (Optional).
1985+
priority is the priority of the task (default: none) (Optional).
1986+
Set one of the numbers corresponding to:
1987+
none = 0,
1988+
low = 10,
1989+
medium = 20,
1990+
high = 30,
18591991
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
18601992
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
18611993
tags is a list of tag to be set (Optional).
@@ -1901,6 +2033,12 @@ def update_sequential_pcd_task(
19012033
task_id is an id of the task (Required).
19022034
status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back',
19032035
'approved', 'declined' (Optional).
2036+
priority is the priority of the task (default: none) (Optional).
2037+
Set one of the numbers corresponding to:
2038+
none = 0,
2039+
low = 10,
2040+
medium = 20,
2041+
high = 30,
19042042
external_status can be 'registered', 'completed', 'skipped', 'reviewed',
19052043
'sent_back', 'approved', 'declined', 'customer_declined'. (Optional)
19062044
tags is a list of tag to be set (Optional).
@@ -3608,6 +3746,8 @@ def __fill_assign_users(payload: dict, **kwargs):
36083746
payload["externalReviewer"] = kwargs.get("external_reviewer")
36093747
if "external_approver" in kwargs:
36103748
payload["externalApprover"] = kwargs.get("external_approver")
3749+
if "priority" in kwargs:
3750+
payload["priority"] = kwargs.get("priority")
36113751

36123752
def execute_endpoint(
36133753
self,

0 commit comments

Comments
 (0)