Failed uploads are reported as success: Version.deploy() / Workspace.deploy_model() don't raise, and roboflow model upload / roboflow image upload <dir> exit 0
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with Version._upload_zip() and Workspace._upload_zip() for swallowed upload failures, then trace _upload_model in roboflow/cli/handlers/model.py and _handle_upload_directory in roboflow/cli/handlers/image.py. Read the related issue #497 and inspect tests for model and image uploads before deciding how to represent partial failures. Done means failed uploads propagate as errors and the CLI exits non-zero; add tests for both paths.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Several upload paths catch errors, print them and continue, so scripts and the CLI cannot detect a failed upload (roboflow 1.7.0, also current main).
Version._upload_zip()andWorkspace._upload_zip()wrap both the request for the signed upload URL and the PUT intry/except Exception: print(...).Version.deploy()andWorkspace.deploy_model()therefore return normally when the upload failed, androboflow model upload(_upload_modelinroboflow/cli/handlers/model.py) prints{"status": "uploaded"}and exits 0. The 429 branch raises aRuntimeErrorinside the sametry, so it is swallowed too; since a version can own several models (#497), its message may also be outdated.Workspace.upload_dataset()(per-image flow) prints[ERR] <path> (...)for each failed image and returnsNone.roboflow image upload <dir>(_handle_upload_directoryinroboflow/cli/handlers/image.py) then reports{"status": "imported", "count": N}, where N is the number of image files on disk, and exits 0, even if every upload failed. In the zip flow, a final statusfailedis passed through as"status": "failed", also with exit code 0.
Reproducer for 1, run from a checkout (offline, mocked HTTP):
from types import SimpleNamespace
from unittest.mock import patch
import responses
from tests.helpers import get_version
bundle = SimpleNamespace(model_type="yolov8n", archive_path=SimpleNamespace(name="roboflow_deploy.zip"))
with responses.RequestsMock() as rsps, patch(
"roboflow.core.version.package_custom_weights_interactive", return_value=bundle
):
rsps.add(responses.GET, "https://api.roboflow.com/Test Workspace Name/Test Project Name/1/uploadModel", status=500)
print(get_version().deploy("yolov8n", "/tmp/weights", "weights/best.pt")) # prints the error, then None
With the same mock and roboflow.Roboflow patched to return that version, roboflow --json model upload -p proj -v 1 -t yolov8n -m <dir> exits 0, and stdout is the printed error followed by {"status": "uploaded"}. For 2: with Project.upload_image raising ImageUploadError for every image, roboflow --json image upload <dir with 3 images> -p proj exits 0 and prints three [ERR] lines followed by {"status": "imported", "count": 3}.
Suggested behavior: raise RoboflowError from both _upload_zip methods (keeping the printed hints as the message) and let the CLI report it through output_error. For upload_dataset, return a summary (uploaded, duplicates, failed with reasons) and let the CLI exit non-zero when anything failed; treat a zip status failed as an error.
I'm happy to send a PR with tests for part 1. Part 2 changes a return value, so I'd like to hear your preference first. Related: #528 (annotation retries), #302.
cc @leeclemnet @digaobarbosa
- Ngôn ngữ chính
- Python
- Star
- 633
- Fork
- 141
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của roboflow/roboflow-python
-
`--json` output is not valid JSON for `search --export`, `image upload <dir>`, `model upload` and `version download`Có thể đã có người làm @cdeil đã nhận 3 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
roboflow/roboflow-python#546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
RLE segmentation mask visible in dataset thumbnail, but invisible in annotation preview/editorĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
roboflow/roboflow-python#505 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
roboflow/roboflow-python#433 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dataset Download StuckĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
roboflow/roboflow-python#429 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
roboflow/roboflow-python#427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của roboflow/roboflow-python
Issue tương tự
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Update Python support to 3.15Đang mởpython-version
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug javascript P2-medium python release:v3.1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
adrirubio/claude-deck#546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: desktop area: website priority: P2 type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
appandflow/stim#3411 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày