Skip to content

Commit d9ce96a

Browse files
author
Diego Ardila
committed
Review feedback
1 parent f1dcfcb commit d9ce96a

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

nucleus/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ANNOTATION_TYPES = (BOX_TYPE, POLYGON_TYPE, SEGMENTATION_TYPE)
1111
ANNOTATION_UPDATE_KEY = "update"
1212
AUTOTAGS_KEY = "autotags"
13-
13+
EXPORTED_ROWS = "exportedRows"
1414
CLASS_PDF_KEY = "class_pdf"
1515
CONFIDENCE_KEY = "confidence"
1616
DATASET_ID_KEY = "dataset_id"

nucleus/dataset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
DATASET_NAME_KEY,
1818
DATASET_SLICES_KEY,
1919
DEFAULT_ANNOTATION_UPDATE_MODE,
20+
EXPORTED_ROWS,
2021
JOB_ID_KEY,
2122
NAME_KEY,
2223
REFERENCE_IDS_KEY,
@@ -347,4 +348,4 @@ def items_and_annotations(
347348
route=f"dataset/{self.id}/exportForTraining",
348349
requests_command=requests.get,
349350
)
350-
return convert_export_payload(api_payload["exportedRows"])
351+
return convert_export_payload(api_payload[EXPORTED_ROWS])

nucleus/slice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from nucleus.dataset_item import DatasetItem
77
from nucleus.job import AsyncJob
88
from nucleus.utils import convert_export_payload, format_dataset_item_response
9+
from nucleus.constants import EXPORTED_ROWS
910

1011

1112
class Slice:
@@ -115,7 +116,7 @@ def items_and_annotations(
115116
route=f"slice/{self.slice_id}/exportForTraining",
116117
requests_command=requests.get,
117118
)
118-
return convert_export_payload(api_payload["exportedRows"])
119+
return convert_export_payload(api_payload[EXPORTED_ROWS])
119120

120121
def send_to_labeling(self, project_id: str):
121122
response = self._client.make_request(

tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def reference_id_from_url(url):
117117
{
118118
**TEST_POLYGON_ANNOTATIONS[i],
119119
"confidence": 0.10 * i,
120-
"class_pdf": None,
120+
"class_pdf": TEST_POLYGON_MODEL_PDF,
121121
}
122122
if i != 0
123123
else {

0 commit comments

Comments
 (0)