Skip to content

Commit 998d94b

Browse files
authored
fix is_prediction function call (#413)
1 parent 3b92a62 commit 998d94b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

roboflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from roboflow.models import CLIPModel, GazeModel # noqa: F401
1616
from roboflow.util.general import write_line
1717

18-
__version__ = "1.2.8"
18+
__version__ = "1.2.9"
1919

2020

2121
def check_key(api_key, model, notebook, num_retries=0):

roboflow/core/workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ def _upload_image(imagedesc):
356356
sequence_number=imagedesc.get("index"),
357357
sequence_size=len(images),
358358
num_retry_uploads=num_retries,
359-
is_prediction=is_prediction,
360359
)
361360

362361
return image, upload_time, upload_retry_attempts
@@ -390,6 +389,7 @@ def _save_annotation(image_id, imagedesc):
390389
image_id=image_id,
391390
job_name=batch_name,
392391
num_retry_uploads=num_retries,
392+
is_prediction=is_prediction,
393393
)
394394

395395
return annotation, upload_time

tests/test_project.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ def test_project_upload_dataset(self):
381381
],
382382
"params": {"is_prediction": True},
383383
"assertions": {
384-
"upload": {"count": 2, "kwargs": {"is_prediction": True}},
385-
"save_annotation": {"count": 2},
384+
"upload": {"count": 2},
385+
"save_annotation": {"count": 2, "kwargs": {"is_prediction": True}},
386386
},
387387
},
388388
{
@@ -392,8 +392,8 @@ def test_project_upload_dataset(self):
392392
],
393393
"params": {"is_prediction": False},
394394
"assertions": {
395-
"upload": {"count": 1, "kwargs": {"is_prediction": False}},
396-
"save_annotation": {"count": 1},
395+
"upload": {"count": 1},
396+
"save_annotation": {"count": 1, "kwargs": {"is_prediction": False}},
397397
},
398398
},
399399
{
@@ -410,11 +410,18 @@ def test_project_upload_dataset(self):
410410
"upload": {
411411
"count": 1,
412412
"kwargs": {
413-
"is_prediction": True,
414413
"batch_name": "prediction-batch",
415414
"num_retry_uploads": 2,
416415
},
417416
},
417+
"save_annotation": {
418+
"count": 1,
419+
"kwargs": {
420+
"is_prediction": True,
421+
"job_name": "prediction-batch",
422+
"num_retry_uploads": 2,
423+
},
424+
},
418425
},
419426
},
420427
]

0 commit comments

Comments
 (0)