Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 687e3fa

Browse files
Update connector.py
1 parent ae2ddac commit 687e3fa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

labelpandas/connector.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create_upload_dict(df:pandas.core.frame.DataFrame, lb_client:Client, base_cl
3030
metadata_name_key_to_schema = base_client.get_metadata_schema_to_name_key(lb_mdo=False, divider=divider, invert=True)
3131
global_key_to_upload_dict = {}
3232
with ThreadPoolExecutor(max_workers=8) as exc:
33-
failed_global_keys = []
33+
errors = []
3434
futures = []
3535
if verbose:
3636
print(f'Submitting data rows...')
@@ -41,19 +41,19 @@ def create_upload_dict(df:pandas.core.frame.DataFrame, lb_client:Client, base_cl
4141
for f in tqdm(as_completed(futures)):
4242
res = f.result()
4343
if res['error']:
44-
failed_global_keys.append(res)
44+
errors.append(res)
4545
else:
4646
global_key_to_upload_dict[str(res["global_key"])] = res
4747
else:
4848
for f in as_completed(futures):
4949
res = f.result()
5050
if res['error']:
51-
failed_global_keys.append(res)
51+
errors.append(res)
5252
else:
5353
global_key_to_upload_dict[str(res["global_key"])] = res
5454
if verbose:
5555
print(f'Generated upload list - {len(global_key_to_upload_dict)} data rows to upload')
56-
return global_key_to_upload_dict, failed_global_keys
56+
return global_key_to_upload_dict, errors
5757

5858
def create_data_rows(lb_client:Client, base_client:baseClient, row:pandas.core.series.Series,
5959
metadata_name_key_to_schema:dict, metadata_schema_to_name_key:dict, row_data_col:str,

0 commit comments

Comments
 (0)