Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Inference IDs to Sources when Uploaded via the Dataset Upload Block #571

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,19 @@ def register_datapoint(
batch_name: str,
tags: List[str],
) -> str:
inference_id = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could u please put todo comment linking this issue: #567

prediction.data["inference_id"][0]
if prediction and "inference_id" in prediction.data
else None
)
roboflow_image_id = safe_register_image_at_roboflow(
target_project=target_project,
encoded_image=encoded_image,
local_image_id=local_image_id,
api_key=api_key,
batch_name=batch_name,
tags=tags,
inference_id=inference_id,
)
if roboflow_image_id is None:
return DUPLICATED_STATUS
Expand All @@ -489,6 +495,7 @@ def safe_register_image_at_roboflow(
api_key: str,
batch_name: str,
tags: List[str],
inference_id: Optional[str],
) -> Optional[str]:
registration_response = register_image_at_roboflow(
api_key=api_key,
Expand All @@ -497,6 +504,7 @@ def safe_register_image_at_roboflow(
image_bytes=encoded_image,
batch_name=batch_name,
tags=tags,
inference_id=inference_id,
)
image_duplicated = registration_response.get("duplicate", False)
if image_duplicated:
Expand Down
Loading