Skip to content

Commit 94e972f

Browse files
committed
v1.0.1 fixes
1 parent e58aad2 commit 94e972f

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ __ https://docs.scale.com/reference#batch-creation
131131
name = 'batch_name_01_07_2021'
132132
)
133133
134-
Finalize Batceh
134+
Finalize Batch
135135
^^^^^^^^^^^^^^^
136136

137137
Finalize a Batch. Check out `Scale's API documentation`__ for more information.

scaleapi/__init__.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from .projects import Project
66

77
TASK_TYPES = [
8-
'annotation',
8+
'annotation',
99
'audiotranscription',
1010
'categorization',
1111
'comparison',
@@ -18,6 +18,7 @@
1818
'polygonannotation',
1919
'segmentannotation',
2020
'transcription',
21+
'textcollection',
2122
'documenttranscription',
2223
'videoannotation',
2324
'videoboxannotation',
@@ -161,7 +162,7 @@ def create_batch(self, project, batch_name, callback):
161162
payload = dict(project=project, name=batch_name, callback=callback)
162163
batchdata = self._postrequest('batches', payload)
163164
return Batch(batchdata, self)
164-
165+
165166
def finalize_batch(self, batch_name):
166167
batchdata = self._postrequest('batches/%s/finalize' % batch_name)
167168
return Batch(batchdata, self)
@@ -184,7 +185,8 @@ def list_batches(self, **kwargs):
184185
response = self._getrequest('batches', params=kwargs)
185186
docs = [Batch(doc, self) for doc in response['docs']]
186187
return Batchlist(
187-
docs, response['totalDocs'], response['limit'],response['has_more'], response.get('next_token'),
188+
docs, response['totalDocs'], response['limit'], response['has_more'], response.get(
189+
'next_token'),
188190
)
189191

190192
def create_project(self, project_name, type, params):
@@ -195,12 +197,12 @@ def create_project(self, project_name, type, params):
195197
def get_projet(self, project_name):
196198
projectdata = self._getrequest('projects/%s' % project_name)
197199
return Project(projectdata, self)
198-
200+
199201
def projects(self):
200202
response = self._getrequest('projects')
201203
return response
202204

203-
def update_project(self,project_name,**kwargs):
205+
def update_project(self, project_name, **kwargs):
204206
allowed_kwargs = {'patch', 'instruction'}
205207
for key in kwargs:
206208
if key not in allowed_kwargs:
@@ -210,9 +212,6 @@ def update_project(self,project_name,**kwargs):
210212
return projectdata
211213

212214

213-
214-
215-
216215
def _AddTaskTypeCreator(task_type):
217216
def create_task_wrapper(self, **kwargs):
218217
return self.create_task(task_type, **kwargs)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
setup(
2929
name='scaleapi',
3030
packages=['scaleapi'],
31-
version='1.0.0',
31+
version='1.0.1',
3232
description='The official Python client library for Scale AI, the Data Platform for AI',
3333
author='Scale AI',
3434
author_email='support@scale.com',

0 commit comments

Comments
 (0)