Skip to content

Commit ab74b56

Browse files
authored
Merge pull request #642 from Labelbox/jtso/al-3013
[AL-3013] Deprecation warning for assign_feature_schema_ids
2 parents dff24d7 + c92f117 commit ab74b56

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

labelbox/data/annotation_types/collection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from concurrent.futures import ThreadPoolExecutor, as_completed
33
from typing import Callable, Generator, Iterable, Union, Optional
44
from uuid import uuid4
5+
import warnings
56

67
from tqdm import tqdm
78

@@ -42,6 +43,9 @@ def assign_feature_schema_ids(
4243
4344
Note: You can now import annotations using names directly without having to lookup schema_ids
4445
"""
46+
warnings.warn("This method is deprecated and will be "
47+
"removed in a future release. Feature schema ids"
48+
" are no longer required for importing.")
4549
for label in self._data:
4650
label.assign_feature_schema_ids(ontology_builder)
4751
return self
@@ -193,6 +197,9 @@ def _assign_ids(label: Label):
193197
label.assign_feature_schema_ids(ontology_builder)
194198
return label
195199

200+
warnings.warn("This method is deprecated and will be "
201+
"removed in a future release. Feature schema ids"
202+
" are no longer required for importing.")
196203
self._fns['assign_feature_schema_ids'] = _assign_ids
197204
return self
198205

labelbox/data/annotation_types/label.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from collections import defaultdict
22
from typing import Any, Callable, Dict, List, Union, Optional
3+
import warnings
34

45
from pydantic import BaseModel, validator
56

@@ -138,6 +139,9 @@ def assign_feature_schema_ids(
138139
139140
Note: You can now import annotations using names directly without having to lookup schema_ids
140141
"""
142+
warnings.warn("This method is deprecated and will be "
143+
"removed in a future release. Feature schema ids"
144+
" are no longer required for importing.")
141145
tool_lookup, classification_lookup = get_feature_schema_lookup(
142146
ontology_builder)
143147
for annotation in self.annotations:

0 commit comments

Comments
 (0)