Skip to content

Commit d885c23

Browse files
committed
Merge branch 'ms/test-fixes' of https://github.com/Labelbox/labelbox-python into jtso/list_bir
2 parents 84cb234 + 9b6e18f commit d885c23

Some content is hidden

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

58 files changed

+1748
-2380
lines changed

CHANGELOG.md

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

3+
# Version 3.1.0 (2021-08-18)
4+
## Added
5+
* Support for new HTML attachment type
6+
* Delete Bulk Import Requests with `BulkImportRequest.delete()`
7+
8+
## Misc
9+
* Updated MEAPredictionImport class to use latest grapqhql endpoints
10+
11+
12+
# Version 3.0.1 (2021-08-12)
13+
## Fix
14+
* Issue with inferring text type from export
15+
16+
# Version 3.0.0 (2021-08-12)
17+
## Added
18+
* Annotation types
19+
- A set of python objects for working with labelbox data
20+
- Creates a standard interface for both exports and imports
21+
- See example notebooks on how to use under examples/annotation_types
22+
- Note that these types are not yet supported for tiled imagery
23+
* MEA Support
24+
- Beta MEA users can now just use the latest SDK release
25+
* Metadata support
26+
- New metadata features are now fully supported by the SDK
27+
* Easier export
28+
- `project.export_labels()` accepts a boolean indicating whether or not to download the result
29+
- Create annotation objects directly from exports with `project.label_generator()` or `project.video_label_generator()`
30+
- `project.video_label_generator()` asynchronously fetches video annotations
31+
* Retry logic on data uploads
32+
- Bulk creation of data rows will be more reliable
33+
* Datasets
34+
- Determine the number of data rows just by calling `dataset.row_count`.
35+
- Updated threading logic in create_data_rows() to make it compatible with aws lambdas
36+
* Ontology
37+
- `OntologyBuilder`, `Classification`, `Option`, and `Tool` can now be imported from `labelbox` instead of `labelbox.schema.ontology`
38+
39+
## Removed
40+
* Deprecated:
41+
- `project.reviews()`
42+
- `project.create_prediction()`
43+
- `project.create_prediction_model()`
44+
- `project.create_label()`
45+
- `Project.predictions()`
46+
- `Project.active_prediction_model`
47+
- `data_row.predictions`
48+
- `PredictionModel`
49+
- `Prediction`
50+
* Replaced:
51+
- `data_row.metadata()` use `data_row.attachments()` instead
52+
- `data_row.create_metadata()` use `data_row.create_attachments()` instead
53+
- `AssetMetadata` use `AssetAttachment` instead
54+
55+
## Fixes
56+
* Support derived classes of ontology objects when using `from_dict`
57+
* Notebooks:
58+
- Video export bug where the code would fail if the exported projects had tools other than bounding boxes
59+
- MAL demos were broken due to an image download failing.
60+
61+
## Misc
62+
* Data processing dependencies are not installed by default to for users that only want client functionality.
63+
* To install all dependencies required for the data modules (annotation types and mea metric calculation) use `pip install labelbox[data]`
64+
* Decrease wait time between updates for `BulkImportRequest.wait_until_done()`.
65+
* Organization is no longer used to create the LFO in `Project.setup()`
66+
67+
68+
# Version 3.0.0-rc3 (2021-08-11)
69+
## Updates
70+
* Geometry.raster now has a consistent interface and improved functionality
71+
* renamed schema_id to feature_schema_id in the `FeatureSchema` class
72+
* `Mask` objects now use `MaskData` to represent segmentation masks instead of `ImageData`
73+
374
# Version 3.0.0-rc2 (2021-08-09)
475
## Updates
576
* Rename `data` property of TextData, ImageData, and VideoData types to `value`.

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
build:
33
docker build -t local/labelbox-python:test .
44

5+
6+
test-local: build
7+
docker run -it -v ${PWD}:/usr/src -w /usr/src \
8+
-e LABELBOX_TEST_ENVIRON="local" \
9+
-e LABELBOX_TEST_API_KEY_LOCAL=${LABELBOX_TEST_API_KEY_LOCAL} \
10+
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
11+
512
test-staging: build
613
docker run -it -v ${PWD}:/usr/src -w /usr/src \
714
-e LABELBOX_TEST_ENVIRON="staging" \

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,14 @@ If the installation completes with a warning re: pip not being in your path, you
3535
export PATH=/Users/<your-macOS-username>/Library/Python/3.8/bin:$PATH
3636
```
3737

38-
Install using Python's Pip manager.
38+
Install SDK locally, using Python's Pip manager
3939
```
40-
pip install labelbox
40+
pip3 install -e .
41+
```
42+
43+
Install dependencies
44+
```
45+
pip3 install -r requirements.txt
4146
```
4247
To install dependencies required for data processing modules use:
4348
```
@@ -55,29 +60,48 @@ pip install labelbox[data]
5560
Labelbox uses API keys to validate requests. You can create and manage API keys on [Labelbox](https://app.labelbox.com/account/api-keys). Pass your API key as an environment variable. Then, import and initialize the API Client.
5661

5762
```
58-
user@machine:~$ export LABELBOX_API_KEY="<your api key here>"
63+
user@machine:~$ export LABELBOX_API_KEY="<your local api key here>"
5964
user@machine:~$ python3
6065
6166
from labelbox import Client
6267
client = Client()
6368
```
69+
* Update api_key and endpoint if not using the production cloud deployment
70+
```
71+
# On prem
72+
client = Client( endpoint = "<local deployment>")
73+
74+
# Local
75+
client = Client(api_key=os.environ['LABELBOX_TEST_API_KEY_LOCAL'], endpoint="http://localhost:8080/graphql")
76+
77+
# Staging
78+
client = Client(api_key=os.environ['LABELBOX_TEST_API_KEY_LOCAL'], endpoint="https://staging-api.labelbox.com/graphql")
79+
```
6480

6581
## Contribution
6682
Please consult `CONTRIB.md`
6783

6884
## Testing
69-
1. Update the `Makefile` with your `staging` or `prod` API key. Ensure that docker has been installed on your system. Make sure the key is not from a free tier account.
70-
2. To test on `staging`:
85+
1. Update the `Makefile` with your `local`, `staging`, `prod` API key. Ensure that docker has been installed on your system. Make sure the key is not from a free tier account.
86+
2. To test on `local`:
87+
```
88+
user@machine:~$ export LABELBOX_TEST_API_KEY_LOCAL="<your local api key here>"
89+
make test-local # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY_LOCAL=specify_here_or_export_me
90+
```
91+
92+
3. To test on `staging`:
7193
```
72-
make test-staging
94+
user@machine:~$ export LABELBOX_TEST_API_KEY_STAGING="<your staging api key here>"
95+
make test-staging # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY_STAGING=specify_here_or_export_me
7396
```
7497

75-
3. To test on `prod`:
98+
4. To test on `prod`:
7699
```
77-
make test-prod
100+
user@machine:~$ export LABELBOX_TEST_API_KEY_PROD="<your prod api key here>"
101+
make test-prod # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY_PROD=specify_here_or_export_me
78102
```
79103

80-
4. If you make any changes and need to rebuild the image used for testing, force a rebuild with the `-B` flag
104+
5. If you make any changes and need to rebuild the image used for testing, force a rebuild with the `-B` flag
81105
```
82-
make -B {build|test-staging|test_prod}
106+
make -B {build|test-staging|test-prod}
83107
```

0 commit comments

Comments
 (0)