Skip to content
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
```

Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions examples/create_dataset.py
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 3 additions & 1 deletion fastlabel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@


class Client:

api = None

def __init__(self):
Expand Down Expand Up @@ -3315,19 +3314,22 @@ def create_dataset(
type: str,
name: str,
slug: str,
annotation_type: str,
) -> dict:
"""
Create a 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)

Expand Down