Skip to content

Commit 93aad9f

Browse files
authored
Merge pull request #612 from Labelbox/develop
v.3.23.3
2 parents bdf6c35 + 0197e0a commit 93aad9f

File tree

4 files changed

+156
-4
lines changed

4 files changed

+156
-4
lines changed

CHANGELOG.md

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

3+
# Version 3.23.3 (2022-06-23)
4+
5+
## Fix
6+
* Import for `numpy` has been adjusted to work with numpy v.1.23.0
7+
38
# Version 3.23.2 (2022-06-15)
49
## Added
510
* `Data Row` object now has a new field, `metadata`, which returns metadata associated with data row as a list of `DataRowMetadataField`

examples/model_assisted_labeling/mal_basics.ipynb

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,147 @@
11
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "db768cda",
6+
"metadata": {
7+
"id": "db768cda"
8+
},
9+
"source": [
10+
"<td>\n",
11+
" <a target=\"_blank\" href=\"https://labelbox.com\" ><img src=\"https://labelbox.com/blog/content/images/2021/02/logo-v4.svg\" width=256/></a>\n",
12+
"</td>"
13+
]
14+
},
15+
{
16+
"cell_type": "markdown",
17+
"id": "cb5611d0",
18+
"metadata": {
19+
"id": "cb5611d0"
20+
},
21+
"source": [
22+
"<td>\n",
23+
"<a href=\"https://colab.research.google.com/github/Labelbox/labelbox-python/blob/develop/examples/model_assisted_labeling/mal_basics.ipynb\" target=\"_blank\"><img\n",
24+
"src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"></a>\n",
25+
"</td>\n",
26+
"\n",
27+
"<td>\n",
28+
"<a href=\"https://github.com/Labelbox/labelbox-python/tree/develop/examples/model_assisted_labeling/mal_basics.ipynb\" target=\"_blank\"><img\n",
29+
"src=\"https://img.shields.io/badge/GitHub-100000?logo=github&logoColor=white\" alt=\"GitHub\"></a>\n",
30+
"</td>"
31+
]
32+
},
33+
{
34+
"cell_type": "markdown",
35+
"id": "fundamental-failure",
36+
"metadata": {
37+
"id": "fundamental-failure"
38+
},
39+
"source": [
40+
"# Annotation Imports\n",
41+
"* This notebook is a high level introduction demonstrating multiple ways to upload your annotations. This will cover the following:\n",
42+
" * Model-assisted labeling - used to provide pre-annotated data for your labelers. This will enable a reduction in the total amount of time to properly label your assets. Model-assisted labeling does not submit the labels automatically, and will need to be reviewed by a labeler for submission.\n",
43+
" * Label Import - used to provide ground truth labels. These can in turn be used and compared against prediction labels, or used as benchmarks to see how your labelers are doing.\n",
44+
"\n",
45+
"\n",
46+
"* For complete examples see image_mal.ipynb or ner_mal.ipynb"
47+
]
48+
},
49+
{
50+
"cell_type": "markdown",
51+
"id": "registered-parts",
52+
"metadata": {
53+
"id": "registered-parts"
54+
},
55+
"source": [
56+
"* For information on what types of annotations are supported per data type, refer to this documentation:\n",
57+
" * https://docs.labelbox.com/docs/model-assisted-labeling#option-1-import-via-python-annotation-types-recommended"
58+
]
59+
},
60+
{
61+
"cell_type": "markdown",
62+
"id": "legislative-violence",
63+
"metadata": {
64+
"id": "legislative-violence"
65+
},
66+
"source": [
67+
"* Notes:\n",
68+
" * If you are importing more than 1,000 mask annotations at a time, consider submitting separate jobs, as they can take longer than other annotation types to import.\n",
69+
" * Wait until the import job is complete before opening the Editor to make sure all annotations are imported properly."
70+
]
71+
},
72+
{
73+
"cell_type": "markdown",
74+
"id": "70072299-2ffe-4ea3-9af1-410d9bfd18cc",
75+
"metadata": {
76+
"id": "70072299-2ffe-4ea3-9af1-410d9bfd18cc"
77+
},
78+
"source": [
79+
"# Installs"
80+
]
81+
},
82+
{
83+
"cell_type": "code",
84+
"execution_count": null,
85+
"id": "pointed-disability",
86+
"metadata": {
87+
"id": "pointed-disability"
88+
},
89+
"outputs": [],
90+
"source": [
91+
"!pip install -q 'labelbox[data]'"
92+
]
93+
},
94+
{
95+
"cell_type": "markdown",
96+
"id": "a5c271de-1006-400e-a5bb-d466b833b734",
97+
"metadata": {
98+
"id": "a5c271de-1006-400e-a5bb-d466b833b734"
99+
},
100+
"source": [
101+
"# Imports"
102+
]
103+
},
104+
{
105+
"cell_type": "code",
106+
"execution_count": null,
107+
"id": "guided-arthritis",
108+
"metadata": {
109+
"id": "guided-arthritis"
110+
},
111+
"outputs": [],
112+
"source": [
113+
"from labelbox.schema.ontology import OntologyBuilder, Tool\n",
114+
"from labelbox import Client, LabelingFrontend, LabelImport, MALPredictionImport\n",
115+
"from labelbox.data.annotation_types import (\n",
116+
" Label, ImageData, ObjectAnnotation, Rectangle, Point, Radio,\n",
117+
" ClassificationAnnotation, ClassificationAnswer\n",
118+
")\n",
119+
"from labelbox.data.serialization import NDJsonConverter\n",
120+
"import uuid\n",
121+
"import json"
122+
]
123+
},
124+
{
125+
"cell_type": "markdown",
126+
"id": "7ff330d7",
127+
"metadata": {
128+
"id": "7ff330d7"
129+
},
130+
"source": [
131+
"# API Key and Client\n",
132+
"Provide a valid api key below in order to properly connect to the Labelbox Client."
133+
]
134+
},
135+
{
136+
"cell_type": "code",
137+
"execution_count": null,
138+
"id": "preliminary-benchmark",
139+
"metadata": {
140+
"id": "preliminary-benchmark",
141+
"outputId": "8cf16a44-d0b8-477f-b361-43865b2fc572"
142+
},
143+
144+
"outputs": [
2145
{
3146
"name": "stderr",
4147
"output_type": "stream",
@@ -371,4 +514,4 @@
371514
},
372515
"nbformat": 4,
373516
"nbformat_minor": 5
374-
}
517+
}

labelbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "labelbox"
2-
__version__ = "3.23.2"
2+
__version__ = "3.23.3"
33

44
from labelbox.client import Client
55
from labelbox.schema.project import Project

labelbox/data/annotation_types/types.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ def validate(cls, val, field: ModelField):
3636
return val
3737

3838

39-
if version.parse(np.__version__) >= version.parse('1.22.0'):
39+
if version.parse(np.__version__) >= version.parse('1.23.0'):
40+
from numpy._typing import _GenericAlias
41+
TypedArray = _GenericAlias(_TypedArray, (Any, DType))
42+
elif version.parse('1.22.0') <= version.parse(
43+
np.__version__) < version.parse('1.23.0'):
4044
from numpy.typing import _GenericAlias
4145
TypedArray = _GenericAlias(_TypedArray, (Any, DType))
4246
else:
43-
TypedArray = _TypedArray[Any, DType]
47+
TypedArray = _TypedArray[Any, DType]

0 commit comments

Comments
 (0)