Skip to content
Snippets Groups Projects
Commit ff110a31 authored by Michelle Weidling's avatar Michelle Weidling :blowfish:
Browse files

fix

parent 453e776c
No related branches found
No related tags found
No related merge requests found
Pipeline #509112 passed
......@@ -20,7 +20,8 @@ def get_all_runs(coll: collection.Collection):
"""
cursor = coll.find({'eval_workflow_id': {'$exists': True}})
json_data = json.loads(json_util.dumps(cursor))
purged = remove_key_from_dict(json_data, 'cpu_time')
purged = remove_key_from_dict(json_data)
print(purged)
return remove_mongodb_id_from_result(purged, 'run')
......@@ -72,7 +73,7 @@ def get_all_runs_by_gt(coll: collection.Collection,
cursor = coll.find({'metadata.gt_workspace.id': gt_regex})
json_data = json.loads(json_util.dumps(cursor))
purged = remove_key_from_dict(json_data, 'cpu_time')
purged = remove_key_from_dict(json_data)
return remove_mongodb_id_from_result(purged, 'run')
......@@ -98,7 +99,7 @@ def get_all_runs_by_gt_and_wf(coll: collection.Collection,
cursor = coll.find({'$and': [{'metadata.gt_workspace.id': gt_regex},
{'metadata.ocr_workflow.id': wf_regex}]})
json_data = json.loads(json_util.dumps(cursor))
purged = remove_key_from_dict(json_data, 'cpu_time')
purged = remove_key_from_dict(json_data)
return remove_mongodb_id_from_result(purged, 'run')
......@@ -124,7 +125,7 @@ def get_latest_runs(coll: collection.Collection,
{'metadata.ocr_workflow.id': wf_regex},
{'metadata.timestamp': compile(closest_timestamp)}]})
latest_run_json = json.loads(json_util.dumps(latest_run))
purged = remove_key_from_dict(latest_run_json, 'cpu_time')
purged = remove_key_from_dict(latest_run_json)
return remove_mongodb_id_from_result(purged, 'run')
......@@ -145,7 +146,7 @@ def get_latest_runs_per_gt(coll: collection.Collection,
latest_run = coll.find({'$and': [{'metadata.gt_workspace.id': gt_regex},
{'metadata.timestamp': compile(closest_timestamp)}]})
latest_run_json = json.loads(json_util.dumps(latest_run))
purged = remove_key_from_dict(latest_run_json, 'cpu_time')
purged = remove_key_from_dict(latest_run_json)
return remove_mongodb_id_from_result(purged, 'run')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment