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 11# 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+
218# Version 3.6.1 (2021-07-10)
319* Fix import error that appears when exporting labels
420
Original file line number Diff line number Diff line change 2121copyright = '2021, Labelbox'
2222author = 'Labelbox'
2323
24- release = '3.0.0-rc0 '
24+ release = '3.7.0 '
2525
2626# -- General configuration ---------------------------------------------------
2727
Original file line number Diff line number Diff line change 11name = "labelbox"
2- __version__ = "3.6.1 "
2+ __version__ = "3.7.0 "
33
44from labelbox .schema .project import Project
55from 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(
669669
670670 Args:
671671 external_ids: List of external ids to fetch data row ids for
672-
673672 Returns:
674673 A dict of external ids as keys and values as a list of data row ids that correspond to that external id.
675674 """
676675 query_str = """query externalIdsToDataRowIdsPyApi($externalId_in: [String!]!){
677676 externalIdsToDataRowIds(externalId_in: $externalId_in) { dataRowId externalId }
678677 }
679678 """
680- max_n_per_request = 100
679+ max_ids_per_request = 100
681680 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 ):
683682 for row in self .execute (
684683 query_str ,
685- {'externalId_in' : external_ids [i :i + max_n_per_request ]
684+ {'externalId_in' : external_ids [i :i + max_ids_per_request ]
686685 })['externalIdsToDataRowIds' ]:
687686 result [row ['externalId' ]].append (row ['dataRowId' ])
688687 return result
You can’t perform that action at this time.
0 commit comments