Added semgrep and some fixes #128
GitHub Actions / Test Results
failed
Feb 26, 2025 in 0s
2 fail, 22 skipped, 71 pass in 2h 38m 50s
Annotations
Check warning on line 0 in tests.core_tests.unittests.test_annotators
github-actions / Test Results
All 5 runs failed: test_cpu_owlv2_annotator_text (tests.core_tests.unittests.test_annotators)
artifacts/Test Results [buildjet-8vcpu-ubuntu-2204] (Python 3.10)/pytest.xml [took 2s]
artifacts/Test Results [macOS-latest] (Python 3.10)/pytest.xml [took 11s]
artifacts/Test Results [macOS-latest] (Python 3.11)/pytest.xml [took 11s]
artifacts/Test Results [windows-latest] (Python 3.10)/pytest.xml [took 3s]
artifacts/Test Results [windows-latest] (Python 3.11)/pytest.xml [took 6s]
Raw output
TypeError: a bytes-like object is required, not 'HTTPResponse'
@pytest.mark.skipif(
total_disk_space < 16,
reason="Test requires at least 16GB of HDD",
)
def test_cpu_owlv2_annotator_text():
> _check_owlv2_annotator("cpu", use_text_prompts=True)
tests\core_tests\unittests\test_annotators.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
device = 'cpu', size = 'base', use_text_prompts = True
def _check_owlv2_annotator(
device: str, size: str = "base", use_text_prompts: bool = True
):
annotator = OWLv2Annotator(device=device, size=size)
if use_text_prompts:
url = "https://ultralytics.com/images/bus.jpg"
> im = Image.open(BytesIO(requests.get(url, stream=True).raw))
E TypeError: a bytes-like object is required, not 'HTTPResponse'
tests\core_tests\unittests\test_annotators.py:30: TypeError
Check warning on line 0 in tests.core_tests.unittests.test_annotators
github-actions / Test Results
All 5 runs failed: test_cpu_owlv2_annotator_image (tests.core_tests.unittests.test_annotators)
artifacts/Test Results [buildjet-8vcpu-ubuntu-2204] (Python 3.10)/pytest.xml [took 1s]
artifacts/Test Results [macOS-latest] (Python 3.10)/pytest.xml [took 1s]
artifacts/Test Results [macOS-latest] (Python 3.11)/pytest.xml [took 1s]
artifacts/Test Results [windows-latest] (Python 3.10)/pytest.xml [took 0s]
artifacts/Test Results [windows-latest] (Python 3.11)/pytest.xml [took 1s]
Raw output
TypeError: a bytes-like object is required, not 'HTTPResponse'
@pytest.mark.skipif(
total_disk_space < 16,
reason="Test requires at least 16GB of HDD",
)
def test_cpu_owlv2_annotator_image():
> _check_owlv2_annotator("cpu", use_text_prompts=False)
tests\core_tests\unittests\test_annotators.py:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
device = 'cpu', size = 'base', use_text_prompts = False
def _check_owlv2_annotator(
device: str, size: str = "base", use_text_prompts: bool = True
):
annotator = OWLv2Annotator(device=device, size=size)
if use_text_prompts:
url = "https://ultralytics.com/images/bus.jpg"
im = Image.open(BytesIO(requests.get(url, stream=True).raw))
final_boxes, final_scores, final_labels = annotator.annotate_batch(
[im], ["bus", "people"]
)
else:
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
> im = Image.open(BytesIO(requests.get(url, stream=True).raw))
E TypeError: a bytes-like object is required, not 'HTTPResponse'
tests\core_tests\unittests\test_annotators.py:36: TypeError
Loading