Skip to content

Commit

Permalink
add support rapid self_label_batch creation (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohua-scale authored Aug 11, 2021
1 parent 7ba150e commit 5d004df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions scaleapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ def create_batch(
project: str,
batch_name: str,
callback: str = "",
instruction_batch: bool = False,
calibration_batch: bool = False,
self_label_batch: bool = False,
) -> Batch:
"""Create a new Batch within a project.
https://docs.scale.com/reference#batch-creation
Expand All @@ -469,10 +470,14 @@ def create_batch(
callback (str, optional):
Email to notify, or URL to POST to
when a batch is complete.
instruction_batch (bool):
calibration_batch (bool):
Only applicable for self serve projects.
Create an instruction batch by setting
the instruction_batch flag to true.
Create a calibration_batch batch by setting
the calibration_batch flag to true.
self_label_batch (bool):
Only applicable for self serve projects.
Create a self_label batch by setting
the self_label_batch flag to true.
Returns:
Batch: Created batch object
Expand All @@ -481,7 +486,8 @@ def create_batch(
payload = dict(
project=project,
name=batch_name,
instruction_batch=instruction_batch,
calibration_batch=calibration_batch,
self_label_batch=self_label_batch,
callback=callback,
)
batchdata = self.api.post_request(endpoint, body=payload)
Expand Down
2 changes: 1 addition & 1 deletion scaleapi/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "2.3.0"
__version__ = "2.4.0"
__package_name__ = "scaleapi"

0 comments on commit 5d004df

Please sign in to comment.