Skip to content

Commit 73e2336

Browse files
authored
Merge pull request #222 from Labelbox/develop
3.0.0-rc0
2 parents 0a9e8fe + 73fd5f7 commit 73e2336

File tree

151 files changed

+12300
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+12300
-823
lines changed

.github/workflows/python-package.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,21 @@ jobs:
4747
uses: AlexanderMelde/yapf-action@master
4848
with:
4949
args: --verbose --recursive --parallel --style "google"
50-
50+
- name: dependencies
51+
run: |
52+
sudo apt-get -y update
53+
sudo apt install -y libsm6 \
54+
libxext6 \
55+
ffmpeg \
56+
libfontconfig1 \
57+
libxrender1 \
58+
libgl1-mesa-glx
5159
- name: install labelbox package
5260
run: |
53-
python setup.py install
61+
python -m pip install --upgrade pip
62+
python -m pip install .
5463
- name: mypy
5564
run: |
56-
python -m pip install --upgrade pip
5765
pip install mypy==0.782
5866
mypy -p labelbox --pretty --show-error-codes
5967
- name: Install package and test dependencies

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,72 @@
11
# Changelog
22

3+
# Version 3.0.0-rc0
4+
## Added
5+
* Annotation types
6+
- A set of python objects for working with labelbox data
7+
- Creates a standard interface for both exports and imports
8+
- See example notebooks on how to use under examples/annotation_types
9+
- Note that these types are not yet supported for tiled imagery
10+
* MEA Support
11+
- Beta MEA users can now just use the latest SDK release
12+
* Metadata support
13+
- New metadata features are now fully supported by the SDK
14+
* Easier export
15+
- `project.export_labels()` accepts a boolean indicating whether or not to download the result
16+
- Create annotation objects directly from exports with `project.label_generator()` or `project.video_label_generator()`
17+
- `project.video_label_generator()` asynchronously fetches video annotations
18+
* Retry logic on data uploads
19+
- Bulk creation of data rows will be more reliable
20+
* Datasets
21+
- Determine the number of data rows just by calling `dataset.row_count`.
22+
- Updated threading logic in create_data_rows() to make it compatible with aws lambdas
23+
* Ontology
24+
- `OntologyBuilder`, `Classification`, `Option`, and `Tool` can now be imported from `labelbox` instead of `labelbox.schema.ontology`
25+
26+
## Removed
27+
* Deprecated:
28+
- `project.reviews()`
29+
- `project.create_prediction()`
30+
- `project.create_prediction_model()`
31+
- `project.create_label()`
32+
- `Project.predictions()`
33+
- `Project.active_prediction_model`
34+
- `data_row.predictions`
35+
- `PredictionModel`
36+
- `Prediction`
37+
* Replaced:
38+
- `data_row.metadata()` use `data_row.attachments()` instead
39+
- `data_row.create_metadata()` use `data_row.create_attachments()` instead
40+
- `AssetMetadata` use `AssetAttachment` instead
41+
42+
## Fixes
43+
* Support derived classes of ontology objects when using `from_dict`
44+
* Notebooks:
45+
- Video export bug where the code would fail if the exported projects had tools other than bounding boxes
46+
- MAL demos were broken due to an image download failing.
47+
48+
## Misc
49+
* Data processing dependencies are not installed by default to for users that only want client functionality.
50+
* To install all dependencies required for the data modules (annotation types and mea metric calculation) use `pip install labelbox[data]`
51+
52+
# Version 2.7b1+mea (2021-06-27)
53+
## Fix
54+
* No longer convert `ModelRun.created_by_id` to cuid on construction of a `ModelRun`.
55+
* This was causing queries for ModelRuns to fail.
56+
57+
# Version 2.7b0+mea (2021-06-27)
58+
## Fix
59+
* Update `AnnotationGroup` to expect labelId to be a cuid instead of uuid.
60+
* Update `datarow_miou` to support masks with multiple classes in them.
61+
362
# Version 2.7.0 (2021-06-27)
463
## Added
564
* Added `dataset.export_data_rows()` which returns all `DataRows` for a `Dataset`.
665

66+
# Version 2.6b2+mea (2021-06-16)
67+
## Added
68+
* `ModelRun.annotation_groups()` to fetch data rows and label information for a model run
69+
770
# Version 2.6.0 (2021-06-11)
871
## Fix
972
* Upated `create_mask_ndjson` helper function in `image_mal.ipynb` to use the color arg
@@ -16,6 +79,15 @@
1679
* Use `DataRow.create_attachment()` instead of `DataRow.create_metadata()`
1780
* Update pydantic version
1881

82+
# Version 2.5b0+mea (2021-06-11)
83+
## Added
84+
* Added new `Model` and 'ModelRun` entities
85+
* Update client to support creating and querying for `Model`s
86+
* Implement new prediction import pipeline to support both MAL and MEA
87+
* Added notebook to demonstrate how to use MEA
88+
* Added `datarow_miou` for calculating datarow level iou scores
89+
90+
1991
# Version 2.5.6 (2021-05-19)
2092
## Fix
2193
* MAL validation no longer raises exception when NER tool has same start and end location

CONTRIB.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,20 @@ following packages/modules:
2727

2828
## Testing
2929

30-
Currently the SDK functionality is tested using integration tests. These tests
30+
Currently, the SDK functionality is tested using integration tests. These tests
3131
communicate with a Labelbox server (by default the staging server) and are in
32-
that sense not self-contained. Besides that they are organized like unit test
32+
that sense not self-contained. Besides, that they are organized like unit test
3333
and are based on the `pytest` library.
3434

3535
To execute tests you will need to provide an API key for the server you're using
3636
for testing (staging by default) in the `LABELBOX_TEST_API_KEY` environment
37-
variable. For more info see [Labelbox API key
38-
docs](https://labelbox.helpdocs.io/docs/api/getting-started).
37+
variable. For more info see [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started).
38+
39+
To pass tests, code must be formatted using the following command:
40+
41+
```shell
42+
yapf labelbox -i --verbose --recursive --parallel --style "google"
43+
```
3944

4045
## Release Steps
4146

@@ -47,10 +52,8 @@ Each release should follow the following steps:
4752
4. Merge `develop` to `master` (fast-forward only).
4853
5. Create a GitHub release.
4954
6. This will kick off a Github Actions workflow that will:
50-
- Build the library in the [standard
51-
way](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives)
52-
- Upload the distribution archives in the [standard
53-
way](https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives)
55+
- Build the library in the [standard way](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives)
56+
- Upload the distribution archives in the [standard way](https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives)
5457
with credentials for the `labelbox` PyPI user.
5558
- Run the `REPO_ROOT/tools/api_reference_generator.py` script to update
5659
[HelpDocs documentation](https://labelbox.helpdocs.io/docs/). You will need

Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
FROM python:3.7
22

33
RUN pip install pytest pytest-cases
4+
RUN apt-get -y update
5+
RUN apt install -y libsm6 \
6+
libxext6 \
7+
ffmpeg \
8+
libfontconfig1 \
9+
libxrender1 \
10+
libgl1-mesa-glx
411

512
WORKDIR /usr/src/labelbox
613
COPY requirements.txt /usr/src/labelbox
714
RUN pip install -r requirements.txt
815
COPY . /usr/src/labelbox
916

10-
1117
RUN python setup.py install

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Install using Python's Pip manager.
3939
```
4040
pip install labelbox
4141
```
42+
To install dependencies required for data processing modules use:
43+
```
44+
pip install labelbox[data]
45+
```
4246

4347
## Documentation
4448

docs/source/index.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,6 @@ Organization
102102
:members:
103103
:show-inheritance:
104104

105-
Prediction
106-
---------------------------------
107-
108-
.. automodule:: labelbox.schema.prediction
109-
:members: Prediction
110-
:exclude-members: PredictionModel
111-
:show-inheritance:
112-
113-
PredictionModel
114-
---------------------------------
115-
.. automodule:: labelbox.schema.prediction
116-
:members: PredictionModel
117-
:exclude-members: Prediction
118-
:show-inheritance:
119-
:noindex:
120-
121105
Project
122106
------------------------------
123107

examples/README.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,47 +4,57 @@
44
* Run in google colab, view the notebooks on github, or clone the repo and run locally
55

66

7-
------
7+
------
88

99
## [Basics](basics)
1010

1111
| Notebook | Github | Google Colab |
1212
| --------------------------- | --------------------------------- | ------------ |
1313
| Fundamentals | [Github](basics/basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/basics.ipynb) |
14-
| Data Rows | [Github](basics/data_rows.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/data_rows.ipynb) |
15-
| Datasets | [Github](basics/datasets.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/datasets.ipynb) |
16-
| Labels | [Github](basics/labels.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/labels.ipynb) |
17-
| Ontologies | [Github](basics/ontologies.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/ontologies.ipynb) |
18-
| Projects | [Github](basics/projects.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/projects.ipynb) |
19-
| User Management | [Github](basics/user_management.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/user_management.ipynb) |
20-
------
14+
| Data Rows | [Github](basics/data_rows.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/data_rows.ipynb) |
15+
| Datasets | [Github](basics/datasets.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/datasets.ipynb) |
16+
| Labels | [Github](basics/labels.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/labels.ipynb) |
17+
| Ontologies | [Github](basics/ontologies.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/ontologies.ipynb) |
18+
| Projects | [Github](basics/projects.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/projects.ipynb) |
19+
| User Management | [Github](basics/user_management.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/basics/user_management.ipynb) |
20+
------
2121

2222
## [Label Export](label_export)
2323

2424
| Notebook | Github | Google Colab |
2525
| --------------------------- | --------------------------------- | ------------ |
2626
| Image Annotation Export | [Github](label_export/images.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/label_export/images.ipynb) |
27-
| Text Annotation Export | [Github](label_export/text.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/label_export/text.ipynb) |
28-
| Video Annotation Export | [Github](label_export/video.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/label_export/video.ipynb) |
29-
------
27+
| Text Annotation Export | [Github](label_export/text.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/label_export/text.ipynb) |
28+
| Video Annotation Export | [Github](label_export/video.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/label_export/video.ipynb) |
29+
------
3030

3131
## [Model Assisted Labeling](model_assisted_labeling)
3232

3333
| Notebook | Github | Google Colab |
3434
| --------------------------- | --------------------------------- | ------------ |
3535
| MAL Basics | [Github](model_assisted_labeling/mal_basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/mal_basics.ipynb) |
36-
| Image MAL | [Github](model_assisted_labeling/image_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/image_mal.ipynb) |
37-
| Named Entity Recognition MAL | [Github](model_assisted_labeling/ner_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/ner_mal.ipynb) |
38-
| Debugging MAL | [Github](model_assisted_labeling/debugging_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/debugging_mal.ipynb) |
39-
| MAL with Subclasses | [Github](model_assisted_labeling/mal_with_subclasses.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/mal_with_subclasses.ipynb) |
40-
| Tiled Imagery MAL | [Github](model_assisted_labeling/tiled_imagery_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/tiled_imagery_mal.ipynb) |
36+
| Image MAL | [Github](model_assisted_labeling/image_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/image_mal.ipynb) |
37+
| Named Entity Recognition MAL | [Github](model_assisted_labeling/ner_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/ner_mal.ipynb) |
38+
| Debugging MAL | [Github](model_assisted_labeling/debugging_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/debugging_mal.ipynb) |
39+
| MAL with Subclasses | [Github](model_assisted_labeling/mal_with_subclasses.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/mal_with_subclasses.ipynb) |
40+
| Tiled Imagery MAL | [Github](model_assisted_labeling/tiled_imagery_mal.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/tiled_imagery_mal.ipynb) |
4141

42-
------
42+
------
4343

4444
## [Project Configuration](project_configuration)
4545

4646
| Notebook | Github | Google Colab |
4747
| --------------------------- | --------------------------------- | ------------ |
48-
| Project Setup | [Github](project_configuration/project_setup.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/project_setup.ipynb) |
49-
| Queue Management | [Github](project_configuration/queue_management.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/queue_management.ipynb) |
50-
| Webhooks | [Github](project_configuration/webhooks.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/webhooks.ipynb) |
48+
| Project Setup | [Github](project_configuration/project_setup.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/project_setup.ipynb) |
49+
| Queue Management | [Github](project_configuration/queue_management.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/queue_management.ipynb) |
50+
| Webhooks | [Github](project_configuration/webhooks.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/project_configuration/webhooks.ipynb) |
51+
52+
53+
## [Annotation Types](annotation_types)
54+
55+
| Notebook | Github | Google Colab |
56+
| --------------------------- | --------------------------------- | ------------ |
57+
| Annotation Type Basics | [Github](annotation_types/basics.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/annotation_types/basics.ipynb) |
58+
| Converters | [Github](annotation_types/converters.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/annotation_types/converters.ipynb) |
59+
| Label Containers | [Github](annotation_types/label_containers.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/annotation_types/label_containers.ipynb) |
60+
| MAL With Annotation Types | [Github](annotation_types/mal_with_annotation_types.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/annotation_types/mal_with_annotation_types.ipynb) |

0 commit comments

Comments
 (0)