diff --git a/README.md b/README.md index a36d863..c5d5c3b 100644 --- a/README.md +++ b/README.md @@ -2125,7 +2125,8 @@ Create a new dataset. dataset = client.create_dataset( name="Japanese Dogs", slug="japanese-dogs", - type="image" + type="image", + annotation_type="image_bbox" ) ``` @@ -2681,10 +2682,11 @@ if __name__ == '__main__': ``` ## Model Monitoring + ### Create Request Results -You can integrate the results of model endpoint calls, -which are targeted for aggregation in model monitoring, from an external source. +You can integrate the results of model endpoint calls, +which are targeted for aggregation in model monitoring, from an external source. ```python from datetime import datetime diff --git a/examples/create_dataset.py b/examples/create_dataset.py new file mode 100644 index 0000000..179c061 --- /dev/null +++ b/examples/create_dataset.py @@ -0,0 +1,13 @@ +from pprint import pprint + +import fastlabel + +client = fastlabel.Client() + +dataset = client.create_dataset( + name="Japanese Dogs", + slug="japanese-dogs", + type="video", + annotation_type="image_bbox", +) +pprint(dataset) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 58b8edd..1181145 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -33,7 +33,6 @@ class Client: - api = None def __init__(self): @@ -3315,6 +3314,7 @@ def create_dataset( type: str, name: str, slug: str, + annotation_type: str, ) -> dict: """ Create a dataset. @@ -3322,12 +3322,14 @@ def create_dataset( type can be 'image', 'video', 'audio' (Required). name is name of your dataset (Required). slug is slug of your dataset (Required). + annotation_type can be 'none', 'image_bbox' (Required). """ endpoint = "datasets" payload = { "type": type, "name": name, "slug": slug, + "annotationType": annotation_type, } return self.api.post_request(endpoint, payload=payload)