File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
+ # Version 3.7.0 (2021-11-10)
3
+ ## Added
4
+ * Search for data row ids from external ids without specifying a dataset
5
+ * ` client.get_data_row_ids_for_external_ids() `
6
+ * Support for numeric metadata type
7
+
8
+ ## Updated
9
+ * The following ` DataRowMetadataOntology ` fields were renamed:
10
+ * ` all_fields ` -> ` fields `
11
+ * ` all_fields_id_index ` -> ` fields_by_id `
12
+ * ` reserved_id_index ` -> ` reserved_by_id `
13
+ * ` reserved_name_index ` -> ` reserved_by_name `
14
+ * ` custom_id_index ` -> ` custom_by_id `
15
+ * ` custom_name_index ` -> ` custom_by_name `
16
+
17
+
2
18
# Version 3.6.1 (2021-07-10)
3
19
* Fix import error that appears when exporting labels
4
20
Original file line number Diff line number Diff line change 21
21
copyright = '2021, Labelbox'
22
22
author = 'Labelbox'
23
23
24
- release = '3.0.0-rc0 '
24
+ release = '3.7.0 '
25
25
26
26
# -- General configuration ---------------------------------------------------
27
27
Original file line number Diff line number Diff line change 1
1
name = "labelbox"
2
- __version__ = "3.6.1 "
2
+ __version__ = "3.7.0 "
3
3
4
4
from labelbox .schema .project import Project
5
5
from labelbox .client import Client
Original file line number Diff line number Diff line change @@ -669,20 +669,19 @@ def get_data_row_ids_for_external_ids(
669
669
670
670
Args:
671
671
external_ids: List of external ids to fetch data row ids for
672
-
673
672
Returns:
674
673
A dict of external ids as keys and values as a list of data row ids that correspond to that external id.
675
674
"""
676
675
query_str = """query externalIdsToDataRowIdsPyApi($externalId_in: [String!]!){
677
676
externalIdsToDataRowIds(externalId_in: $externalId_in) { dataRowId externalId }
678
677
}
679
678
"""
680
- max_n_per_request = 100
679
+ max_ids_per_request = 100
681
680
result = defaultdict (list )
682
- for i in range (0 , len (external_ids ), max_n_per_request ):
681
+ for i in range (0 , len (external_ids ), max_ids_per_request ):
683
682
for row in self .execute (
684
683
query_str ,
685
- {'externalId_in' : external_ids [i :i + max_n_per_request ]
684
+ {'externalId_in' : external_ids [i :i + max_ids_per_request ]
686
685
})['externalIdsToDataRowIds' ]:
687
686
result [row ['externalId' ]].append (row ['dataRowId' ])
688
687
return result
You can’t perform that action at this time.
0 commit comments