@@ -86,9 +86,9 @@ def create_data_rows_from_table(
86
86
87
87
# Create a dictionary where {key=global_key : value=data_row_upload_dict} - this is unique to Pandas
88
88
global_key_to_upload_dict , data_row_conversion_errors = connector .create_data_row_upload_dict (
89
- lb_client = self .lb_client , table = table ,
90
- row_data_col = row_data_col , global_key_col = global_key_col , external_id_col = external_id_col ,
91
- metadata_index = metadata_index , local_files = local_files , divider = divider , verbose = verbose
89
+ client = self .lb_client , table = table , row_data_col = row_data_col ,
90
+ global_key_col = global_key_col , external_id_col = external_id_col , metadata_index = metadata_index ,
91
+ attachment_index = attachment_index , local_files = local_files , divider = divider , verbose = verbose
92
92
)
93
93
94
94
# If there are conversion errors, let the user know; if there are no successful conversions, terminate the upload
@@ -115,20 +115,21 @@ def create_data_rows_from_table(
115
115
)
116
116
117
117
# Create a dictionary where {key=project_id : value=list_of_data_row_ids}, if applicable
118
- project_id_to_batch_dict = connector .create_batches (
118
+ project_id_to_batch_dict , batch_to_project_errors = connector .create_batches (
119
119
client = self .lb_client , table = table , global_key_col = global_key_col ,
120
120
project_id_col = project_id_col , global_key_to_data_row_id = global_key_to_data_row_id
121
121
)
122
122
123
123
# Batch data rows to projects, if applicable
124
- batch_results = uploader .batch_rows_to_project (
125
- client = self .lb_client , project_id_to_batch_dict , priority = priority
126
- )
124
+ if not batch_to_project_errors :
125
+ batch_to_project_errors = uploader .batch_rows_to_project (
126
+ client = self .lb_client , project_id_to_batch_dict , priority = priority
127
+ )
127
128
128
129
# Create a dictionary where {key=project_id : value=annotation_upload_list}, if applicable
129
130
project_id_to_upload_dict , annotation_conversion_errors = connector .create_annotation_upload_dict (
130
131
client = self .lb_client , table = table , row_data_col = row_data_col , global_key_col = global_key_col ,
131
- project_id_col = project_id_col , annotation_index = annotation_index
132
+ project_id_col = project_id_col , annotation_index = annotation_index , divider = divider , verbose = verbose
132
133
)
133
134
134
135
# Upload your annotations to Labelbox, if applicable
@@ -138,7 +139,8 @@ def create_data_rows_from_table(
138
139
139
140
return {
140
141
"data_row_upload_results" : data_row_upload_results ,
141
- "data_row_conversion_errors" : data_row_conversion_errors ,
142
+ "data_row_conversion_errors" : data_row_conversion_errors ,
143
+ "batch_to_project_errors" : batch_to_project_errors
142
144
"annotation_upload_results" : annotation_upload_results ,
143
145
"annotation_conversion_errors" : annotation_conversion_errors
144
146
}
0 commit comments