@@ -30,7 +30,7 @@ Any parameter available in the documentation_ can be passed as an argument optio
3030
3131The following endpoints for tasks are available:
3232
33- Create categorization task
33+ Create Categorization Task
3434==========================
3535
3636Check `this `__ for further information.
@@ -47,45 +47,7 @@ __ https://scale.com/docs/#create-categorization-task
4747 categories = [' public' , ' private' ]
4848 )
4949
50- Create transcription task
51- =========================
52-
53- Check `this `__ for further information.
54-
55- __ https://scale.com/docs/#create-ocr-transcription-task
56-
57- .. code-block :: python
58-
59- task = client.create_transcription_task(
60- callback_url = ' http://www.example.com/callback' ,
61- instruction = ' Transcribe the given fields. Then for each news item on the page, transcribe the information for the row.' ,
62- attachment_type = ' website' ,
63- attachment = ' http://www.google.com/' ,
64- fields = { ' title' : ' Title of Webpage' , ' top_result' : ' Title of the top result' },
65- row_fields = { ' username' : ' Username of submitter' , ' comment_count' : ' Number of comments' }
66- )
67-
68- Create comparison task
69- ======================
70-
71- Check `this `__ for further information.
72-
73- __ https://scale.com/docs/#create-comparison-task
74-
75- .. code-block :: python
76-
77- client.create_comparison_task(
78- callback_url = ' http://www.example.com/callback' ,
79- instruction = ' Do the objects in these images have the same pattern?' ,
80- attachment_type = ' image' ,
81- choices = [' yes' , ' no' ],
82- attachments = [
83- ' http://i.ebayimg.com/00/$T2eC16dHJGwFFZKjy5ZjBRfNyMC4Ig~~_32.JPG' ,
84- ' http://images.wisegeek.com/checkered-tablecloth.jpg'
85- ]
86- )
87-
88- Create annotation task
50+ Create Annotation Task
8951======================
9052
9153Check `this `__ for further information.
@@ -102,45 +64,12 @@ __ https://scale.com/docs/#2d-box-annotation
10264 objects_to_annotate = [" baby cow" , " big cow" ]
10365 )
10466
105- Create datacollection task
106- =========================
107-
108- Check `this `__ for further information.
109-
110- __ https://scale.com/docs/#create-data-collection-task
111-
112- .. code-block :: python
113-
114- task = client.create_datacollection_task(
115- callback_url = ' http://www.example.com/callback' ,
116- instruction = ' Find the URL for the hiring page for the company with attached website.' ,
117- attachment_type = ' website' ,
118- attachment = ' http://www.google.com/' ,
119- fields = { ' hiring_page' : ' Hiring Page URL' },
120- )
121-
122- Create audiotranscription task
123- ==============================
124-
125- Check `this `__ for further information.
126-
127- __ https://scale.com/docs/#create-audio-transcription-task
128-
129- .. code-block :: python
130-
131- task = client.create_audiotranscription_task(
132- callback_url = ' http://www.example.com/callback' ,
133- attachment_type = ' audio' ,
134- attachment = ' https://storage.googleapis.com/deepmind-media/pixie/knowing-what-to-say/second-list/speaker-3.wav' ,
135- verbatim = False
136- )
137-
13867 Retrieve task
13968=============
14069
14170Check `this `__ for further information.
14271
143- __ https://scale.com/docs/ #retrieve-a-task
72+ __ https://docs. scale.com/reference #retrieve-tasks
14473
14574Retrieve a task given its id.
14675
@@ -154,7 +83,7 @@ Cancel task
15483
15584Check `this `__ for further information.
15685
157- __ https://scale.com/docs/ #cancel-a -task
86+ __ https://docs. scale.com/reference #cancel-task
15887
15988Cancel a task given its id, only if it's not completed.
16089
@@ -167,25 +96,32 @@ List tasks
16796
16897Check `this `__ for further information.
16998
170- __ https://scale.com/docs/ #list-all -tasks
99+ __ https://docs. scale.com/reference #list-multiple -tasks
171100
172101Retrieve a list of tasks, with optional filter by date/type. Paginated with limit/offset.
173102The return value is a ``scaleapi.Tasklist ``, which acts as a list, but also has fields
174103for the total number of tasks, the limit and offset, and whether or not there's more.
175104
176105.. code-block :: python
177106
178- tasks = client.tasks(
179- start_time='2015-10-13T22:38:42Z',
180- end_time='2016-10-13T22:38:42Z',
181- type='categorization',
182- limit=100,
183- offset=200)
184-
185- print(tasks.total) # 1000
186- print(tasks.limit) # 100
187- print(tasks.offset) # 200
188- print(tasks.has_more) # True
107+ next_token = None;
108+ counter = 0
109+ all_tasks =[]
110+ while True:
111+ tasks = client.tasks(
112+ start_time = "2020-09-08",
113+ end_time = "2021-01-01",
114+ customer_review_status = "accepted",
115+ next_token = next_token,
116+ )
117+ for task in tasks:
118+ counter += 1
119+ print(f'Downloading Task {counter} | {task.task_id}')
120+ all_tasks.append(task.__dict__['param_dict'])
121+ next_token = tasks.next_token
122+ if next_token is None:
123+ break
124+ print(all_tasks)
189125
190126 Error handling
191127==============
@@ -204,4 +140,4 @@ as a ``scaleapi.ScaleException`` or ``scaleapi.ScaleInvalidRequest`` runtime er
204140 Troubleshooting
205141===============
206142
207- If you notice any problems, please email us at support@scaleapi .com.
143+ If you notice any problems, please email us at support@scale .com.
0 commit comments