Skip to content

[2.4.0] Add support for rapid self_label_batch creation #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"